Why do deep learning frameworks scale activations by 1/(1-p) during training rather than at test time?

Last updated 3 November 2026

  • Keeping units with probability 1−p shrinks expected activations to (1−p)·a. Dividing by (1−p) during training (inverted dropout) restores the expectation to a, matching test time.

  • This makes inference a plain identity pass: no extra ops or latency, nothing to export, and no need to track p in 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.

  • https://apxml.com/courses/deep-learning-regularization-optimization/chapter-3-dropout-regularization/inverted-dropout
  • https://www.geeksforgeeks.org/deep-learning/dropout-regularization-in-deep-learning/
  • https://www.geeksforgeeks.org/machine-learning/dropout-in-neural-networks/
All Regularization interview questions