Syllabus Lesson 99 of 246 · Module 8: Run Clinic I
Module 8: Run Clinic I

Clinic: start and scale faults

Why it matters Faults from Module 6 in the wild: they stop learning before it starts.

Dead units: every hidden unit is off for every input, so no gradient reaches the first layer and the loss never leaves 2.30. Unscaled inputs: pixels arrive as 0 to 16 instead of 0 to 1, activations are huge, the starting loss is far above 2.30, and the first steps are violent. (The BatchNorm train/eval trap from Module 6 belongs here too; you have already met it.)

Each case below is a training run with one fault planted in it. For each: spend probes to find the fault, then write a fix as config changes. The faults in this lesson: dead_units, unscaled_inputs, plus one fault from earlier. Fewer probes is better; a good diagnostician rarely needs more than two per case.

ProbeWhat it tells you
loss_curve(c)Training loss every 50 steps and final validation accuracy. Always look first.
loss_at_init(c)Loss before training. A fresh 10-class model should be near ln(10) = 2.30.
overfit_one_batch(c)Can it memorise 32 examples? A healthy setup gets near 0.
grad_norms(c)Gradient size per weight matrix at the start. Zero means nothing can learn.
update_ratio(c)Plain SGD step size relative to weight size. Healthy is about 0.001 to 0.1 (a rule of thumb for plain SGD; Module 14 shows why Adam differs).
act_stats(c)Hidden activations: mean, largest value, share of dead units.
lr_schedule(c)The learning rate at steps 0, 50, 100 and so on.
batch_labels(c)The labels in the first few batches.
overlap(c)How many validation examples also appear in training.
Words and symbols in this lesson
probe
a quick measurement of a run, such as gradient sizes or dead units
Your turn

Fill in diagnosis (case to fault name) and fixes (case to a dictionary of config changes) for cases A, B and C. A fix must remove the fault and train to at least 90% validation accuracy.

Spotted a problem in this lesson? Report it · Ask about this lesson

This exercise opens soon

Finish the lesson before it and this one unlocks. The whole course is free, no account needed, and you can read this lesson right now.