alkzar90 commited on
Commit
3cff897
1 Parent(s): fdfc503

Update progress counter

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -76,9 +76,12 @@ if cost_function == 'RMSE-Loss':
76
  grad_loss = jax.grad(loss)
77
 
78
  # Perform gradient descent
 
79
  for i in range(1,NUM_ITER+1):
80
- # Update progress bar.
81
- progress_bar.progress(i+1)
 
 
82
 
83
  # Update parameters.
84
  w -= learning_rate * grad_loss(w)
 
76
  grad_loss = jax.grad(loss)
77
 
78
  # Perform gradient descent
79
+ progress_counter = 0
80
  for i in range(1,NUM_ITER+1):
81
+ if i %10==0:
82
+ # Update progress bar.
83
+ progress_counter += 1
84
+ progress_bar.progress(progress_counter)
85
 
86
  # Update parameters.
87
  w -= learning_rate * grad_loss(w)