Skip to content

Commit 80e149e

Browse files
Update main.py
1 parent acc295d commit 80e149e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mnist/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test(model, device, test_loader):
5454
model.eval()
5555
test_loss = 0
5656
correct = 0
57-
with torch.no_grad():
57+
with torch.inference_mode():
5858
for data, target in test_loader:
5959
data, target = data.to(device), target.to(device)
6060
output = model(data)

0 commit comments

Comments
 (0)