Skip to content

Commit 1adcbb9

Browse files
authored
Merge pull request MorvanZhou#5 from liufuyang/fix-up-401
Fix up test code
2 parents 51f1c93 + 528d7cc commit 1adcbb9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tutorial-contents/401_CNN.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def plot_with_labels(lowDWeights, labels):
122122
plt.ioff()
123123

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

0 commit comments

Comments
 (0)