AI01 Gradient Explorer
AI Lab · Module 1 · companion to sections 2.1, 2.6 and 2.7

Gradient Explorer

Four small instruments for the ideas in AI01 that move. Change a slider, predict what the picture will do before you let go, then check. Every number is computed live in your browser with the same 64-bit floats Python uses. Back to the book's companion page

Section 2.6 · one knob

How big a step?

Gradient descent on L(w) = (w − 3)², starting at w = 0. Each step multiplies the distance to 3 by 1 − 2η. Try 0.1, 0.5, 0.9, 1.0, then 1.05.

Section 2.6 · two knobs

A valley steeper one way

L = ½(w₁² + κ·w₂²). The steep direction caps η at 2/κ; the gentle one then crawls. Raise κ, then find the largest η that still converges. Click the map to move the start.

Section 2.7 · checking a slope

How small should h be?

Estimate the slope of tanh at x = 0.5 by nudging x. Slide h from large to tiny and watch the error fall, bottom out, then climb as rounding takes over.

Section 2.1 and AI01.09 · saturation

Where tanh stops learning

A gradient arriving at a tanh node leaves multiplied by the slope 1 − tanh²(z). Push z past about 3 and almost nothing gets through.