PyTorch scales the activation during training with the inverse as seen here 2.
This inverse scaling is mentioned in the original dropout paper (if I’m not mistaken) and allows you to just disable the dropout layer during evaluation.