Modern deep learning frameworks like PyTorch make neural networks feel almost magical.
loss.backward()
One line.
That’s all it takes to compute gradients for millions of parameters.
But what actually happens inside?
How does a neural network learn?
What is backpropagation really doing?
What exactly is autograd?
This blog is a deep, step-by-step walkthrough inspired by Andrej Karpathy’s micrograd project, where we build a tinygrad (tiny autograd engine) from scratch and then use it to build a neural network.
The goal is not just to use neural networks.
The goal is to understand:
how neural networks actually learn under the hood
We will build:
And by the end, you’ll understand what frameworks like PyTorch are doing internally.