GuideOpen

Cheatsheet (deep learning book)

Decision rules and thresholds. One line each; the chapter has the reasoning.

Cheatsheet

Decision rules and thresholds. One line each; the chapter has the reasoning.

Loss selection (ch03, ch06)

TargetDistributionOutput unitLoss
Real, unboundedGaussianlinearMSE
BinaryBernoullisigmoidbinary cross-entropy
One of KCategoricalsoftmaxcross-entropy
Real, heavy-tailedLaplacelinearMAE
Multimodal realMixturemixture densityNLL of the mixture

Never pair sigmoid output with MSE — the gradient vanishes where the model is most wrong.

Underfit vs overfit (ch05, ch11)

Train errorVal errorVerdictFirst action
HighHighUnderfit / optimizationCheck LR, init, capacity — not more data
LowHighOverfitMore data → augmentation → regularization
LowLowWorkingStop; check the metric is the right one
~0 on 20 examples: fails—BugFix the pipeline before anything else

Past the interpolation threshold, prefer more data / longer training / more regularization over shrinking the model (double descent, ch05).

Optimizer defaults (ch08)

SituationReach for
Any starting pointAdamW, LR ~1e-3 (small nets) / ~1e-4 (large), warmup + cosine decay
Recurrence in the graphAdd gradient clipping, always
Tiny batchesGroup/layer norm, not batch norm
Loss flat, grad norm largeIll-conditioning — momentum, adaptive, or normalization
Loss NaNNumerics first: log(0), div by ~0, exp overflow, exploding grad

Regularization ladder (ch07)

More real data → label-preserving augmentation → early stopping → decoupled weight decay → label smoothing → dropout → smaller model. One at a time; measure the gap after each.

Architecture prior (ch09, ch10)

DataPrior that fitsNote
Grid, translation-invariant statisticsConvolutionCheapest when data is limited
Sequence, long-range dependenceAttention/transformerThe 2016 RNN advice is superseded
Sequence, very long contextState-space / linear recurrencePost-2016; ch10's gradient analysis applies
Arbitrary tabular columnsNeitherLocality prior is false

Generative model taxonomy (ch20)

FamilyHandles Z byCharacteristic failure
AutoregressiveChain rule — no ZSlow sequential sampling
VAEBounding likelihood (ELBO)Blurry samples
GANAvoiding likelihoodMode collapse, unstable training
Diffusion / score-basedLearning ∇ log pMany sampling steps (mitigable)
Boltzmann machinesSampling the negative phaseHistorical; do not start here

Numerical hygiene (ch04)

Log-space for probability products · stabilized/fused softmax and cross-entropy · clip gradients with recurrence · bf16 over fp16 when range matters · check condition number before blaming LR.

Study-order rule (ch01–ch20)

Ch 5 and Ch 11 are the highest-value chapters for a practitioner and can be read early. Ch 2–4 are prerequisites for Ch 8 specifically. Ch 13→14→19→20 is the only strict chain in Part III. Ch 18 is worth reading even if you never train an undirected model — score matching became diffusion.

Source: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/deep-learning-book/skills/deep-learning-book/cheatsheet.md

Author: alirezarezvani, Alireza Rezvani skills and agents. License: MIT.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The Codex library holds 7,009 entries. Members can search all of them by meaning and read every one in full.