Question 1
Which of the following is the MOST correct way to run a trained model on test data?
y = model(X_test)
model.eval() y = model(X_test)
with torch.no_grad(): y = model(X_test)
model.eval() with torch.no_grad(): y = model(X_test)
Which of the following is the MOST correct way to run a trained model on test data?
y = model(X_test)
model.eval() y = model(X_test)
with torch.no_grad(): y = model(X_test)
model.eval() with torch.no_grad(): y = model(X_test)
Correct answer
model.eval() with torch.no_grad(): y = model(X_test)
Question 1 of 24 in the IIT Madras BS Introduction to Deep Learning and Generative AI (Deep Learning and GenAI) End Term paper sat on 10 May 2026, in the January 2026 term (Introduction To Deep Learning And Generative Ai 06 May 26 (Session 2)). It carries 4 marks.