Spaces:
Runtime error
Runtime error
Update progress counter
Browse files
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 |
-
|
81 |
-
|
|
|
|
|
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)
|