Frontier Research Engineering

ML Foundations from Scratch

Socratic Tutor

Shapes, gradients, losses and optimizers — the math you actually use, with NumPy exercises.

Shapes & NumPy

Vectors, Matrices and NumPy Shapes
12 min
Broadcasting and Vectorization
12 min
What a Layer ComputesCore
12 min

Gradients

Derivatives and the Chain Rule for Engineers
13 min
Backprop Through a Linear LayerCore
15 min

Losses

Likelihood, Cross-Entropy and KL Divergence
13 min
Softmax, Cross-Entropy and Stable Log-Sum-ExpCore
14 min

Optimization

Gradient Descent, Mini-Batches and Learning RateCore
12 min
Momentum, Adam, AdamW and LR Schedules
15 min

Generalization

Generalization: Splits, Overfitting and Regularization
11 min

Putting it together

Putting It Together: Train an MLP in NumPy
15 min
StackSweep | Engineering practice