alkzar90 commited on
Commit
3e06692
1 Parent(s): 3b0e8de

edit code snippet

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -62,8 +62,11 @@ else:
62
  st.markdown('The training loop:')
63
 
64
  code = '''NUM_ITER = 1000
65
- for i in range(NUM_ITER):
66
- w -= learning_rte * grad_loss(w)'''
 
 
 
67
 
68
  st.code(code, language='python')
69
 
 
62
  st.markdown('The training loop:')
63
 
64
  code = '''NUM_ITER = 1000
65
+ # initialize parameters
66
+ w = np.array([3., -2., -8.])
67
+ for i in range(NUM_ITER):
68
+ # update parameter
69
+ w -= learning_rte * grad_loss(w)'''
70
 
71
  st.code(code, language='python')
72