I found there are two kinds of method to implement dropout, the first one is by nn.Module and the other is by functional.

module: https://pytorch.org/docs/stable/nn.html?#torch.nn.functional.dropout2d 263

functional: https://pytorch.org/docs/stable/nn.html?#torch.nn.functional.dropout2d 263


Besides, in the functional API, it also supports dropout rate as its parameter. Does it mean we can use functional version in the nn.forward method to change the dropout rate dynamically?