Hall of FameAndrej Karpathy201917 min readintermediate
A Recipe for Training Neural Networks
Summary
Karpathy outlines a disciplined recipe for training neural nets that treats the process as a debugging problem. He stresses data inspection, minimal baselines, fixed seeds, and extensive visual checks to catch silent failures early.
- Inspect data thoroughly (duplicates, corrupt labels, class imbalance) before writing any model code.
- Start with a tiny model, fix the random seed, verify loss at init and overfit a single batch to ensure the pipeline works.
- Create simple baselines (human, input‑independent, linear classifier) to detect misconfigurations early.
- Visualize inputs right before the model and track prediction dynamics on a fixed test batch throughout training.
ML engineers who build and iterate on models need a systematic debugging workflow to avoid silent training bugs that waste time and resources.
6/10

