Solved by Nikronic in post #7 
              
              
                Something I think I have to mention is that, setting model.train or model.eval won’t effect on autograd. In fact, for instance, dropout layers have to be turned off in eval mode. So, you have to use model.eval but if you do not set required_grad= off, it still affects training and computes this valu…