model.eval() does not change the gradient calculation, but switches the behavior of some modules to evaluation mode, such as dropout (will be disabled) and batchnorm (will use the running stats instead of the batch stats).
However, as @RupertP explained, the .grad attributes are None after initializing the model and will just be populated after the first backward call.
It seems you haven’t performed this step yet, so you would have to move the print statement after the first training iteration.
PS: You can post code snippets by wrapping them into three backticks ```, which makes debugging easier.