I built reverse-mode autograd from scratch
Part II · Autograd on single numbers · Grad School: Build a Neural Network Framework from Scratch
In Part II you taught numbers to remember where they came from, pushed blame back through a graph with the chain rule, checked every derivative numerically, and trained a network with your own engine.