Yes, exactly. Let’s say you are using a pretrained model. If you do not set model.eval, then some of values in resulted tensor will be zero which is not desired as we already trained the model and want a stable values not some random zeros where happens differently in every run.
Although remember that model.eval only has effect on dropout and batchnorm as we discussed, but still you need to use torch.no_grad() to loop over network for inference stage, otherwise, even if you have had set model.eval, gradients will be updated.