Course

Deep learning from the ground up

Networks built from numbers you can check

  • Advanced
  • 10 chapters
  • 160 min read

What a neural network actually computes: nested lists with a shape, a forward pass that bends, a loss that turns a prediction into one number, and a backward pass that is the chain rule in reverse. Then the parts that make it train — optimisers, regularisation, batching, recurrent layers and the gradients that travel through time, mixed precision and the memory budget of a GPU step — and a capstone autograd engine that fits XOR.

What You'll Learn

  • Read a tensor’s shape and keep the axes straight
  • Build a dense layer and explain why the nonlinearity matters
  • Choose a loss that matches the output and compute it stably
  • Derive and check gradients by hand
  • Compare SGD, momentum and Adam on the same problem
  • Diagnose overfitting and apply the right regulariser
  • Write a training loop with batches, evaluation and accumulation
  • Carry a hidden state through a sequence and clip its gradients
  • Explain fp16, bf16 and the memory cost of a training step
  • Build a scalar autograd engine and train a small network

Prerequisites

  • Comfortable with Python lists, functions and classes
  • Basic linear algebra: vectors, matrices and dot products
  • No ML framework is needed — every example is plain Python

Vocabulary

The terms the chapters assume, in plain words.

activation
A rule applied to each number in a layer that lets the network bend, rather than only scale and add.
autograd
Software that records operations during a forward pass and later computes their gradients automatically.
backpropagation
Working backwards through a network to find how each weight affects the loss, by multiplying local slopes.
batch
A group of examples processed together in one step, averaged into a single update.
epoch
One full pass over the training examples.
forward pass
Running inputs through a network to produce outputs, before any error is measured.
gradient
The direction and steepness in which a value rises fastest; training moves weights the opposite way.
learning rate
How far each update moves the weights; too large overshoots, too small crawls.
loss
One number saying how wrong the current predictions are, which training tries to reduce.
optimiser
The procedure that uses gradients to decide how each weight changes.
overfitting
When a network memorises accidental details of its training examples and does worse on new ones.
regularisation
Any penalty or limit that discourages a network from chasing noise in its training examples. The aim is better performance on new data.
tensor
A nested list of numbers with a shape that says what each axis means.

Course Content

  1. 01
    Tensors as nested lists

    A tensor is a nested list plus a shape. Every layer is a shape transformation, and most deep learning bugs are shape bugs wearing a numeric costume.

    Intermediate · 14 min read

    Not started
  2. 02
    The forward pass

    A layer is a matrix multiply, a bias and a nonlinearity. Stack them and the nonlinearity is the only reason the stack is more than one big matrix.

    Intermediate · 15 min read

    Not started
  3. 03
    Loss functions

    A loss turns a prediction into one number the optimiser can lower. Mean squared error and cross-entropy are the two you will use, and both have a careful form.

    Intermediate · 15 min read

    Not started
  4. 04
    Backpropagation by hand

    Backpropagation is the chain rule applied in reverse order, with each node passing its local gradient back to the nodes that fed it. Nothing more.

    Advanced · 18 min read

    Not started
  5. 05
    Optimizers

    Gradient descent says which way is downhill. The optimiser decides how far to step, and that decision is most of what separates a run that converges from one that does not.

    Advanced · 16 min read

    Not started
  6. 06
    Overfitting and regularisation

    A model that memorises its training set has learned the noise. Regularisation is any constraint that makes the easy answer harder, and validation is how you know it worked.

    Advanced · 16 min read

    Not started
  7. 07
    Batching and the training loop

    An epoch is a pass over the data, a step is one update. The loop that connects them is short, and every line in it is a place a run can go quietly wrong.

    Advanced · 15 min read

    Not started
  8. 08
    Sequence models

    A recurrence applies one rule at every step and carries a state between them. That sharing is what handles variable length, and it is also why gradients have to travel so far.

    Advanced · 16 min read

    Not started
  9. 09
    GPUs and mixed precision

    A GPU is a throughput machine, and a float is a budget of range and resolution. Training in mixed precision is the art of spending that budget where it does not change the answer.

    Advanced · 17 min read

    Not started
  10. 10
    Capstone: a tiny autograd

    A scalar autograd engine is a hundred lines: a value, its gradient, the operation that made it, and a reverse walk over the graph. Training a network then needs nothing else.

    Advanced · 18 min read

    Not started