You will write the checks a training run makes before it starts, use them and the curves to find what is wrong with three broken runs, then make one script that runs on a GPU or a CPU, stops and resumes from a checkpoint, and learns with warmup and a cosine decay.

About 45 minutes. You do it on your own computer. You need your own computer, with uv (free); Windows, Linux or a Mac with Apple silicon, since PyTorch no longer ships for Intel Macs; about 1 GB of disk for PyTorch. A GPU is used when there is one, and not needed.

  1. Both curvesRun it
  2. Two checks before the runYour turn
  3. Three broken runsYour turn
  4. Any computer, and a checkpointYour turn
  5. Warmup, then a cosineYour turn
  6. The best warmup and peakOn your own
Terminal
curl -LsSf https://astral.sh/uv/install.sh | sh
cd learn-deep-learning/labs/dl-lab-checked-run/starter
uv sync

See it on GitHub

When you have run it

In step 3, before you mend it, the run whose network was made again after its optimizer: what loss does its one-batch check end on?

Run on macOS on an M1 Max (its GPU, `mps`, for step 4), uv 0.11.15, Python 3.12, PyTorch 2.15.0, NumPy 2.5.5, scikit-learn 1.9.1, matplotlib 3.11.2. Checked on .