Skip to content

Commit 528d7cc

Browse files
committed
Fix up test code
1 parent 51f1c93 commit 528d7cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tutorial-contents/401_CNN.py

+1-1
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)