updating week40 and typos
This commit is contained in:
@@ -280,8 +280,8 @@ theta = np.random.randn(2,1)
|
||||
for epoch in range(n_epochs):
|
||||
for i in range(m):
|
||||
random_index = np.random.randint(m)
|
||||
xi = X[random_index:random_index+1]
|
||||
yi = y[random_index:random_index+1]
|
||||
xi = X[random_index:random_index+m]
|
||||
yi = y[random_index:random_index+m]
|
||||
gradients = 2.0* xi.T @ ((xi @ theta)-yi)
|
||||
eta = learning_schedule(epoch*m+i)
|
||||
theta = theta - eta*gradients
|
||||
|
||||
Reference in New Issue
Block a user