micrograd
A tiny scalar-valued autograd engine and a neural net library
micrograd is a tiny, educational automatic differentiation engine focused on scalar values, built to show how backpropagation works end to end with minimal code. It constructs a dynamic computation graph as you perform math operations and then computes gradients by walking that graph backward, making it an approachable “from scratch” autograd reference. On top of the core autograd “Value” concept, the project includes a small neural network library that lets you define and train simple...