Lab 4 of 7about 45 minutes
A training run that checks itself
It uses what you learned in Reading loss curves, Training on a GPU and Warmup and learning-rate schedules.
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.
- Both curvesRun it
- Two checks before the runYour turn
- Three broken runsYour turn
- Any computer, and a checkpointYour turn
- Warmup, then a cosineYour turn
- The best warmup and peakOn your own
curl -LsSf https://astral.sh/uv/install.sh | sh
cd learn-deep-learning/labs/dl-lab-checked-run/starter
uv syncWhen 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 .
