ptrblck:

Yes, eval()/train() do not change anything about the gradients and if parameters require gradients, but change the behavior (code paths) of some layers.


You mean to say eval() and train() don’t change anything if the parameters have requires_grad set to False right ? And could you also give examples of where the behaviour might change (as you mentioned in the answer)?