Phase 3 of 6 · Weeks 33–48
Phase 3 — Deep Learning
Start with a single neuron, build your own autograd engine, and finish with a transformer you understand line by line.
What you'll be able to do
- Build a working automatic-differentiation engine from scratch
- Derive backpropagation for a two-layer network on paper and verify it in code
- Train a convolutional network and explain what each filter has learned
- Implement attention and assemble a transformer block from its parts
- Diagnose vanishing gradients, dead units and overfitting from training curves
- Use PyTorch deliberately — knowing what every call is doing underneath
What you need before you start
Assumed on day one
- Phase 1 calculus — the chain rule, partial derivatives, gradients
- Phase 2 discipline — loss functions, train/val/test splits, regularisation
- Confident NumPy and Python
Taught here — not assumed
- Perceptrons, multi-layer networks and activation functions
- Computational graphs, automatic differentiation and vector-Jacobian products
- PyTorch tensors, `nn.Module`, optimisers, datasets and dataloaders
- Convolutional networks, recurrent networks and sequence modelling
- Attention, self-attention and the transformer architecture
Week by week (16 weeks)
- W33Neural Network Foundations
- W34Backpropagation Deeply
- W35PyTorch Fundamentals
- W36Training Dynamics
- W37Optimization for Deep Learning
- W38CNNs I
- W39CNN Architectures
- W40Sequence Models (RNNs & LSTMs)
- W41Attention & Transformers I
- W42Transformers II — Building GPT
- W43Tokenization Deeply
- W44Pretraining Concepts
- W45Fine-tuning & Transfer Learning
- W46Parameter-Efficient Fine-Tuning (PEFT)
- W47Computer Vision Deep Dive (Optional Specialization)
- W48Phase 3 Capstone
What you'll build
- `micrograd` — a scalar autograd engine built from scratch
- Backpropagation for a two-layer MLP derived by hand, then verified in code
- An image classifier trained end-to-end in PyTorch
- A transformer block assembled from your own attention implementation
Read and play with it first
Free, no-signup explainers and interactive demos covering this phase's ideas.
Attention Is All You Need, explained from scratch
The Transformer paper behind ChatGPT — every idea and every bit of maths, built up so a Class-9 student can follow along.
~35 min read
What a single neuron computes
Multiply, add, switch. The one unit every neural network is built from — worked out by hand.
~7 min read
Convolution: how CNNs see images
Slide a small filter across an image, multiply and sum — the operation that lets CNNs find edges, shapes and objects.
~8 min read
The chain rule and backpropagation
How a network figures out which way to nudge every weight — the chain rule, run backward through the layers.
~8 min read
What is a Transformer block?
Attention → add & norm → feed-forward → add & norm. The single block that, stacked, becomes every modern LLM.
~8 min read
Questions about this phase
- Do I need a GPU for Phase 3?
- Not to start. The from-scratch work runs on any laptop. For the larger training runs, free hosted notebooks with GPU access are enough — the curriculum is designed around what is freely available.
- Why build an autograd engine instead of starting with PyTorch?
- Because `loss.backward()` is a black box until you have written one. Building the engine takes about a week and makes every later debugging session faster.
- Is this enough to understand how ChatGPT works?
- Phase 3 gets you the transformer — the architecture underneath it. Phase 4 covers how those models are trained, prompted, fine-tuned and retrieved from.
Start with a real lesson, not a sales page.
Play through a complete lesson — predict, explore the demo, prove you've got it. No account, no card.