Skip to content

Commit

Permalink
Fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
delldu committed Dec 5, 2018
1 parent 6b8abaa commit f6eeca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion show_cls.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@

pred_choice = pred.data.max(1)[1]
correct = pred_choice.eq(target.data).cpu().sum()
print('i:%d loss: %f accuracy: %f' %(i, loss.data[0], correct/float(32)))
print('i:%d loss: %f accuracy: %f' % (i, loss.data.item(), correct / float(32)))

0 comments on commit f6eeca1

Please sign in to comment.