Gradient descent, visualized
Step down a curve yourself and see why the learning rate matters, how valleys trap you, and why plain gradient descent zig-zags.
Training a model means finding the weights that make its loss small. Gradient descent does that with one repeated move: find which way is downhill from where you are, and take a step that way. The size of the step is the learning rate, and these pieces run the real calculation.
Local valleys
Gradient descent only sees the slope where it's standing, so where you start decides which valley you find.
Why it zig-zags
Real losses are often steep in one direction and gentle in another. A step big enough for the gentle direction overshoots in the steep one, so the path bounces from wall to wall. Momentum and Adam are optimizers designed for this problem.
Learn how this works, properly
A free account opens all 244 lessons, with Python that runs in your browser, saved progress and certificates.