KnowML
Interactive

Backprop Lab

One tiny network — 3 inputs, 4 tanh hidden units, 2 outputs — and one training example. Step through the forward pass, then walk the chain rule backward one derivative at a time, then watch all 29 of those derivatives get re-measured numerically and compared against the analytic ones.

Step through at your own pace · prerequisites: Neural Network Fundamentals (04)

How to use this page ▾

Take the tabs in order — Forward first, since every gradient on the later tabs is a derivative of the loss it computes. Each backward step shows three things side by side: the local derivative of that one operation, the incoming gradient from the step above it, and their product. That is the chain rule made visible rather than asserted.

The tab that matters most is Gradient check. It throws the whole derivation away and re-measures every partial derivative the slow way — nudge one parameter by h, re-run the entire network, see how much the loss moved — then prints the largest disagreement between the two methods. Every number on this page, including that verdict, is computed by real arithmetic in your browser from one seeded example. Nothing is hand-typed.

What this page simplifies, on purpose

Related pages