-
Notifications
You must be signed in to change notification settings - Fork 4
Description
First of all, thanks for the great book and for keeping the code up to date! There seems to be a bug in 03_gradient/plot_loss_with_path.py, if I understood everything correctly.
The history path should be on the surface, because the gradient descent moves along the surface, right? When I rotate the diagram, the line floats partly over the surface and has two direction changes.
I couldn't understand that. If I change the code like this:
current_loss = loss(X, Y, w, b)
- history.append([w, b, previous_loss])
+ history.append([w, b, current_loss])Now the line lies on the surface, it only has one kink and now actually seems to follow the steepest descent in each case. It also makes sense according to my understanding, because we want to plot the loss that belongs to w, b not the loss that belonged to the previous w and previous b. Is that correct? If so, perhaps you can put this corrections (and others, if any) in a README in the appropriate directory?

