Archive — one question answered
How does one gradient descent step work?
Once you have the gradient, how do you update weight w?
Gradient descent moves parameters downhill on the loss. For one weight , derivative and learning rate :
Toy numbers: , , . Update: . Loss usually drops if is not too large.
The minus sign trips beginners: gradient increases loss, so we step opposite. With many parameters, each and updates together after gradients on one example or a batch.
w, grad, eta = 0.5, 2.0, 0.1
w = w - eta * grad
assert w == 0.3The Deep Learning track does this by hand on one spam email before wrapping a NumPy loop — so when loss explodes, you check or gradients first. Treat as “if I nudge a tiny bit, does loss go up or down?” — the update rule is just that question turned into arithmetic. On the course spreadsheet exercise, students recompute for the spam neuron before trusting w -= eta * grad in NumPy.