Gradient descent
Follow a parameter down a loss curve and see why step size matters.
Gradient descent
Follow a parameter down a loss curve and see why step size matters.
The dashed path connects successive updates. Follow the filled point.
Change the experiment
loss = w ** 2
gradient = 2 * w
w = w - learning_rate * gradientTry it yourself
Compare learning rates 0.1, 0.5 and 1.1. Which converges fastest, and which diverges?
Update 0: w = 3.0000, loss = 9.0000.
For this quadratic, convergence requires 0 < learning rate < 1. Real training losses have different curvature.
Playback pauses in hidden tabs and offscreen. With reduced motion enabled, use the timeline or Next step.Turn the idea into an implementation
Compare learning rates 0.1, 0.5 and 1.1. Which converges fastest, and which diverges?
Predict a result, change one input, then explain what happened. Use the timeline to revisit a state and compare it with the algorithm sketch.
Explain it in an interview
For this quadratic, convergence requires 0 < learning rate < 1. Real training losses have different curvature.
Describe the inputs, the state that changes, the computational cost and a limitation of the model before discussing a production implementation.