Yes, this is necessary as model.eval() will set all modules to evaluation mode.
For example batch norm layers will use the running statistics to normalize the current sample instead of the batch statistics and also won’t update the running stats, while dropout layers will be disables during evaluation.