Why do deep learning frameworks scale activations by 1/(1-p) during training rather than at test time?
Last updated
Keeping units with probability
1−pshrinks expected activations to(1−p)·a. Dividing by(1−p)during training (inverted dropout) restores the expectation toa, matching test time.This makes inference a plain identity pass: no extra ops or latency, nothing to export, and no need to track
pin deployment. Inference runs far more often than training, so it should be the cheap path.The match is exact only for the mean through linear layers. Variance still differs between modes, which can cause train/test shift when dropout precedes BatchNorm.