In PyTorch, what does calling model.eval() do?
- Sets dropout and batchnorm to eval
- Turns off gradient tracking
- Computes the loss on test data
- Freezes all of the weights permanently
eval() changes layer behavior (no dropout, running batchnorm stats); disabling gradients needs torch.no_grad().
Play AI & ML ▸