Skip to content

Commit

Permalink
mnist test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfeiBai committed Feb 28, 2024
1 parent ae5b005 commit e493f69
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_train_mp_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ def test_loop_fn(loader):
total_samples = 0
correct = 0
model.eval()
interator_local = 0
print("loader: ", loader)
print("type loader: ", type(loader))
for data, target in loader:
interator_local = interator_local + 1
print("test_loop_fn for loop: ", interator_local)
output = model(data)
pred = output.max(1, keepdim=True)[1]
correct += pred.eq(target.view_as(pred)).sum()
Expand Down

0 comments on commit e493f69

Please sign in to comment.