You can also give a dropout probability of  0.0 (a float value), if you don’t want any dropout to be applied during training (i.e. so that it won’t zero-out some of the tensors)
See here: https://github.com/pytorch/examples/blob/master/word_language_model/main.py#L34 231