LESSON 2.32 · 5 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
Gradient clipping
Watch one huge gradient throw the weights away, and see clipping stop it.
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 2.32 · CLIP BAYSTEPS 0–4 · NORM ≤ 0.97 · LOSS 2.67
01
Stage 1 of 5 · Step downhill
Gradient descent moves the weights by −η·g each step. The gradient norm ‖g‖ stays at 0.97 or less.
Explain it simply
You see two weights on a map of the loss, like a hiker on a hillside. Each step moves them a little way downhill. The step is the learning rate times the gradient. The gradient's length, its norm, stays at 0.97 or less, so every step is short.
The weights take 5 steps down the plateau. The loss falls from 3.92 to 1.28. The gradient norm stays at 0.97 or less.
weights, max norm cgradient, no clippingclipped runloss contours
Toy: 2 weights · a loss with one cliff · 20 steps of gradient descent, η = 0.5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each step moves the weights against the gradient, scaled by η.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 more stages and 2 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.