small typo in week40

This commit is contained in:
Morten Hjorth-Jensen
2021-11-22 06:20:15 +01:00
parent 01610bc12d
commit b7ef6f0a03
9 changed files with 229 additions and 229 deletions
+1 -1
View File
@@ -1048,7 +1048,7 @@ for epoch in range(n_epochs):
random_index = M*np.random.randint(m)
xi = X[random_index:random_index+M]
yi = y[random_index:random_index+M]
gradients = (2.0/M)*training_gradient(yi, xi, theta)
gradients = (1.0/M)*training_gradient(yi, xi, theta)
eta = learning_schedule(epoch*m+i)
theta = theta - eta*gradients
print("theta from own sdg")