You need to scale the activations either

during testing with the keep probability or
during training with 1/keep_prob


Otherwise the expected activation values will have a different range and your model will perform poorly.
PyTorch uses the second approach.