Backprop a Tiny Net by Hand
Compute gradients on paper, confirm in code.
Our Tiny Network
Let's hand-trace the smallest net: one input x, one weight w, no bias. The output is simply y = w times x. Tiny enough to do on paper.
y = w * xAdd a Simple Loss
We compare the output to a target t with squared error. This loss punishes being far from the target and is easy to differentiate by hand.
loss = (y - t) ** 2All lessons in this course
- The Chain Rule, Layer by Layer
- Forward Caches, Backward Reuses
- Backprop a Tiny Net by Hand
- Vanishing & Exploding Gradients