This answer 77 may give the best explanation for the difference between nn.Dropout and nn.functional.dropout. Generally speaking, nn.Dropout and nn.functional.dropout perform the same functionality(source code 9), the main difference is that nn.Dropout is a wrapper class for the nn.functional.dropout, in which nn.Dropout derives from nn.Module. In this way, nn.Dropout is desired to be defined as a layer in your model, so that when your model’s state changes nn.Dropout layer will get notified, then  nn.Dropout layer’s state would get changed according to the model’s state. For example, while calling model.eval()  your nn.Dropout layer would directly pass all activations but to do nothing, if using nn.functional.dropout  you have no choice to handle these stuff manually, for more details, please go to this answer 77.