alkzar90 commited on
Commit
fdfc503
1 Parent(s): 8869fec

Fix progress bar error

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -76,15 +76,15 @@ if cost_function == 'RMSE-Loss':
76
  grad_loss = jax.grad(loss)
77
 
78
  # Perform gradient descent
79
- for i in range(NUM_ITER):
80
  # Update progress bar.
81
- progress_bar.progress(i)
82
 
83
  # Update parameters.
84
  w -= learning_rate * grad_loss(w)
85
 
86
  # Update status text.
87
- if (i+1)%100==0:
88
  # report the loss at the current epoch
89
  status_text.text(
90
  'Trained loss at epoch %s is %s' % (i, loss(w)))
 
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)
85
 
86
  # Update status text.
87
+ if (i)%100==0:
88
  # report the loss at the current epoch
89
  status_text.text(
90
  'Trained loss at epoch %s is %s' % (i, loss(w)))