Skip to content

Commit

Permalink
Created using Colab
Browse files Browse the repository at this point in the history
  • Loading branch information
udlbook committed Oct 24, 2024
1 parent 7ba844f commit 5eb2645
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions Notebooks/Chap10/10_5_Convolution_For_MNIST.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyNELb86uz5qbhEKH81UqFKT",
"authorship_tag": "ABX9TyORZF8xy4X1yf4oRhRq8Rtm",
"include_colab_link": true
},
"kernelspec": {
Expand Down Expand Up @@ -72,8 +72,12 @@
"# even before you make changes.\n",
"batch_size_train = 64\n",
"batch_size_test = 1000\n",
"\n",
"# TODO Change this directory to point towards an existing directory\n",
"myDir = '/files/'\n",
"\n",
"train_loader = torch.utils.data.DataLoader(\n",
" torchvision.datasets.MNIST('/files/', train=True, download=True,\n",
" torchvision.datasets.MNIST(myDir, train=True, download=True,\n",
" transform=torchvision.transforms.Compose([\n",
" torchvision.transforms.ToTensor(),\n",
" torchvision.transforms.Normalize(\n",
Expand All @@ -82,7 +86,7 @@
" batch_size=batch_size_train, shuffle=True)\n",
"\n",
"test_loader = torch.utils.data.DataLoader(\n",
" torchvision.datasets.MNIST('/files/', train=False, download=True,\n",
" torchvision.datasets.MNIST(myDir, train=False, download=True,\n",
" transform=torchvision.transforms.Compose([\n",
" torchvision.transforms.ToTensor(),\n",
" torchvision.transforms.Normalize(\n",
Expand All @@ -96,15 +100,6 @@
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "YGwbxJDEm88i"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
Expand Down

0 comments on commit 5eb2645

Please sign in to comment.