We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acc295d commit 80e149eCopy full SHA for 80e149e
mnist/main.py
@@ -54,7 +54,7 @@ def test(model, device, test_loader):
54
model.eval()
55
test_loss = 0
56
correct = 0
57
- with torch.no_grad():
+ with torch.inference_mode():
58
for data, target in test_loader:
59
data, target = data.to(device), target.to(device)
60
output = model(data)
0 commit comments