$ ./guess_the_languageAI & ML
AI & ML · hard · #34

In PyTorch, what does calling model.eval() do?

  1. Sets dropout and batchnorm to eval
  2. Turns off gradient tracking
  3. Computes the loss on test data
  4. Freezes all of the weights permanently
eval() changes layer behavior (no dropout, running batchnorm stats); disabling gradients needs torch.no_grad().
Play AI & ML ▸