Solved by ptrblck in post #2 
              
              
                Each nn.Module uses the internal self.training flag, which is changed by calling model.train() and model.eval(), and can be used as a condition to use different behaviors inside the module.