Dropout
August 2026 – Vladislav KruglikovDropout randomly sets part of an activation tensor to zero during training. It is a regularizer. The model cannot rely on every feature always being present, so it is pushed to learn less brittle representations.
Train and eval behavior
During training, each value is kept with probability and dropped with probability . The kept values are divided by :
where is a random mask with values or .
The scaling keeps the expected value the same. For one activation :
That is why in evaluation dropout does nothing but in training samples a mask and rescales the kept activations.
Where to put dropout
Dropout should usually come after the activation because some activations turn an input of zero into a nonzero output. For example, , so masking a value before sigmoid does not actually remove it. Masking after the activation always makes the dropped feature zero. With ReLU the two placements can be equivalent because .
Do not dropout the logits
Applying dropout after the final logits usually does not make sense. Logits are the direct inputs to the loss. If we randomly zero them, we are corrupting the model's answer right before the objective reads it.