jitesh:

You mean to say eval() and train() don’t change anything if the parameters have requires_grad set to False right ?


No. train() and eval() are completely independent of the requires_grad attribute of any parameters.
These methods change the self.training attribute of the model to True or False, which is then used to trigger different code paths.



 jitesh:

And could you also give examples of where the behaviour might change (as you mentioned in the answer)


Dropout will be disabled when eval() is used and batchnorm layers will use their running stats to normalize the input activation instead of the batch stats.