Ray's Blog

Notes on computing, from first principles.

The Little Learner in Python

中文系列

How does a neural network learn? This series follows the ideas in The Little Learner, rebuilding them in Python so that we can see how each piece works.

We start with a model and a loss, then build gradient descent, tensor operations, optimizers, and automatic differentiation. Finally, we put those pieces together into a neural network that classifies Iris flowers.

  1. Part 1: The Core Optimization Mechanism
  2. Part 2: Gradient Descent
  3. Part 3: Tensors
  4. Part 4: Optimizers
  5. Part 5: Automatic Differentiation
  6. Part 5.5: Automatic Differentiation 2.0
  7. Part 6: Neural Networks

The articles develop the ideas step by step. For the complete, runnable implementation and examples, see the tiny-learner repository.