Solved by mariosasko in post #2 
              
              
                The forward pass looks the same, but during inference you should change the module’s mode to eval (call model.eval()). This will update the module’s internal flag self.training and do the same for each submodule (this means you can call this once on the top-level module). This flag is used if the mo…