Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions 02_pytorch_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"source": [
"## Where can you get help?\n",
"\n",
"All of the materials for this course [live on GitHub](https://github.com/mrdbourke/pytorch-deep-learning).\n",
"All of the materials for this course [live on GitHub](https://github.com/mrdbourke/pytorch-deep-learning). \n",
"\n",
"And if you run into trouble, you can ask a question on the [Discussions page](https://github.com/mrdbourke/pytorch-deep-learning/discussions) there too.\n",
"\n",
Expand Down Expand Up @@ -877,7 +877,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
Expand Down Expand Up @@ -912,7 +912,9 @@
],
"source": [
"# Make predictions with the model\n",
"untrained_preds = model_0(X_test.to(device))\n",
"model_0.eval()\n",
"with torch.inference_mode():\n",
" untrained_preds = model_0(X_test.to(device))\n",
"print(f\"Length of predictions: {len(untrained_preds)}, Shape: {untrained_preds.shape}\")\n",
"print(f\"Length of test samples: {len(y_test)}, Shape: {y_test.shape}\")\n",
"print(f\"\\nFirst 10 predictions:\\n{untrained_preds[:10]}\")\n",
Expand Down