Skip to content

Commit 8e71164

Browse files
committed
add alternative line
1 parent 1692532 commit 8e71164

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ch14/ch14_part1.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@
11541154
" ax = fig.add_subplot(2, 6, i+1)\n",
11551155
" ax.set_xticks([]); ax.set_yticks([])\n",
11561156
" img = mnist_test_dataset[i][0][0, :, :]\n",
1157-
" pred = model(img.unsqueeze(0).unsqueeze(1))\n",
1157+
" pred = model(img.unsqueeze(0).unsqueeze(1)) # alternatively: mnist_test_dataset.data[i].float()\n",
11581158
" y_pred = torch.argmax(pred)\n",
11591159
" ax.imshow(img, cmap='gray_r')\n",
11601160
" ax.text(0.9, 0.1, y_pred.item(), \n",
@@ -1235,7 +1235,7 @@
12351235
"name": "python",
12361236
"nbconvert_exporter": "python",
12371237
"pygments_lexer": "ipython3",
1238-
"version": "3.9.7"
1238+
"version": "3.10.12"
12391239
}
12401240
},
12411241
"nbformat": 4,

0 commit comments

Comments
 (0)