Index

Autograd by Hand

How It Learns
How It Learns · Open board

The How It Learns board draws the loop: loss, slope, step, repeat. This lesson writes the part that finds the slopes, in Python: the first of six lessons that end with a small GPT built from scratch.

Before you start. A weight is one adjustable number inside a network. The loss is one number for how wrong the network’s answer is. A weight’s slope says how much the loss moves when you nudge that weight; one slope per weight, all together, is the gradient. In One Knob, One Slope you found one slope by hand: nudge the weight, see how much the loss changed, divide by the nudge. In How It Learns (loss, gradient descent, backprop) a number’s slope is its blame, its share of the wrongness. From What a Neural Network Is: a neuron multiplies each input by a weight and adds them up, plus one extra number called the bias. Also from What a Neural Network Is: XOR is a door with two switches that opens when exactly one is on, which one neuron cannot learn and a hidden layer, a row of neurons in the middle, can.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Lab

Every step of training walks the dials downhill. How far should each step go?

Drag How far each step goes from 0.001 up to 0.5 and watch Steps to a loss under 0.01 fall, then vanish.

Open The learning rate →

Related paper

Review AI →

Saved in this browser, and to your account when you sign in.