Tutorials
Ten projects, finished
Where Learn takes one idea at a time, these take one problem from beginning to end — data, model, training, and a look at what came out. Every block runs in the page on your own GPU, and you can edit it before you run it. Nothing is installed.
1 · Quickstart
A whole classifier in five blocks — data, model, training, accuracy, and the mistakes it made. Start here.
2 · From scratch
The training loop built from raw tensors, then nn, then optim, then a DataLoader. Answers "what is nn actually doing".
3 · Curve fitting
What a hidden layer buys, drawn rather than described — and where a fitted model stops meaning anything.
4 · Image classifier needs data
Real CIFAR-10: look at the photographs, train a small CNN, read the accuracy per class instead of as one number.
5 · Adversarial needs data
Take the gradient with respect to the picture and move it just far enough to change the answer. Six lines.
6 · Char RNN
A recurrent network reads names one letter at a time and guesses the language. Forty-five words, typed into the page.
7 · Signals and the FFT
Find the frequencies inside a signal, filter with them, and measure what writing the input differently is worth.
8 · Attention
Three lines of arithmetic, a task built for them, and the thing attention cannot do at all until you tell it where things are.
9 · Autoencoder
Squeeze a picture through two numbers and back, then check what those two numbers turned out to mean.
10 · Least squares
Some models are solved, not trained. lstsq and svd, and how to tell when an exact answer is worth nothing.
New to the ideas themselves? Learn covers them one at a time — tensors, autograd, modules, training — and these projects assume you have met them, or are willing to meet them mid-project.
The two that need data
Tutorials 4 and 5 use a real dataset, and this repository keeps binaries out of
git — the same rule that puts vendor/pyodide and
borch-ts/dist outside every commit. Build the subset once:
python3 site/fetch_data.py # from CIFAR binaries you already have
python3 site/fetch_data.py --download # or fetch them
It writes about 1MB into site/assets/data/: 2,000 training and 500
test images, JPEG-compressed. The pixels are not identical to the
original, which is fine for "does it learn" and not fine for comparing a
number against a paper. The pages say so where the number appears.
What these are not
They are not a benchmark and not a state-of-the-art anything. A tab-sized model on 2,000 images tells you the chain works end to end; the repository's own measured numbers are the ones to quote. Transfer learning and pretrained weights are absent on purpose and will stay absent — they are things you leave the browser to learn.