Skip to content

Commit ae394aa

Browse files
committed
agentic-fix(try-2): test_accurac issue
1 parent e8c1f9b commit ae394aa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

train_mnist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ def forward(self, x):
126126
inputs, labels = inputs.to(device), labels.to(device)
127127
outputs = model(inputs)
128128
test_loss += criterion(outputs, labels).item()
129-
batch_correct = (outputs.argmax(1) == labels).sum().item()
130-
correct += batch_correct
129+
batch_correct = (outputs.argmax(1) == labels).sum().item()
130+
correct += batch_correct
131131
batch_acc = batch_correct / len(inputs)
132132
test_accuracies.append(batch_acc)
133133

0 commit comments

Comments
 (0)