Skip to content

Commit

Permalink
Fix up test code
Browse files Browse the repository at this point in the history
  • Loading branch information
liufuyang committed Jun 19, 2017
1 parent 51f1c93 commit 528d7cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tutorial-contents/401_CNN.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def plot_with_labels(lowDWeights, labels):
plt.ioff()

# print 10 predictions from test data
test_output = cnn(test_x[:10])
test_output, _ = cnn(test_x[:10])
pred_y = torch.max(test_output, 1)[1].data.numpy().squeeze()
print(pred_y, 'prediction number')
print(test_y[:10].numpy(), 'real number')

0 comments on commit 528d7cc

Please sign in to comment.