How autograd works

May 16, 2025

How it works

Follow a small autograd example from inputs through multiplication, addition, ReLU, and a squared loss. The computation graph and walkthrough show each tensor’s forward value and the gradients from the completed backward pass.

Switch to the Code tab to explore example.py, tensor.py, and graph.py, including the tensor operations, backpropagation, and graph rendering.