Skip to content

Commit 315b6e8

Browse files
authored
Update run.py (#7)
1 parent be26c0a commit 315b6e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def correct(output, target, topk=(1,)):
8383

8484
res = []
8585
for k in topk:
86-
correct_k = correct[:k].view(-1).float().sum(0).item()
86+
correct_k = correct[:k].reshape(-1).float().sum(0).item()
8787
res.append(correct_k)
8888
return res
8989

0 commit comments

Comments
 (0)