Small addition to:



 MrPositron:

So you model class keeps track of them, that is why you can just turn off the dropout module by calling eval(). When using the functional dropout your model is not aware of it, thus it won’t appear in any summary.


The right approach would be to use the internal self.training flag, which is manipulated by calling model.train() and model.eval() via:
x = F.dropout(x, p=self.p, training=self.training)

This would also enable and disable this dropout call if model.train() or model.eval() is called, respectively.