What's the use of these Module classes?

I noticed that some Module class wrap the Function class from torch.nn.functional again. For example, there is Dropout in torch.nn.functional which is imported from torch/nn/_functions/dropout.py, and there is Dropout in torch.nn which is imported from torch/nn/modules/dropout.py too.

I read the Neural Networks tutorial, it use only some functions from torch.nn.functional in defining a Module, so I do not know what is the need of these modules.

This question was already answered a number of time.

2 Likes