Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

fix: different syntax for PyTorch 1.x for transforms.Normalize #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Binary file added MNIST_data/MNIST/processed/test.pt
Binary file not shown.
Binary file added MNIST_data/MNIST/processed/training.pt
Binary file not shown.
Binary file added MNIST_data/MNIST/raw/t10k-images-idx3-ubyte
Binary file not shown.
Binary file added MNIST_data/MNIST/raw/t10k-images-idx3-ubyte.gz
Binary file not shown.
Binary file added MNIST_data/MNIST/raw/t10k-labels-idx1-ubyte
Binary file not shown.
Binary file added MNIST_data/MNIST/raw/t10k-labels-idx1-ubyte.gz
Binary file not shown.
Binary file added MNIST_data/MNIST/raw/train-images-idx3-ubyte
Binary file not shown.
Binary file added MNIST_data/MNIST/raw/train-images-idx3-ubyte.gz
Binary file not shown.
Binary file added MNIST_data/MNIST/raw/train-labels-idx1-ubyte
Binary file not shown.
Binary file added MNIST_data/MNIST/raw/train-labels-idx1-ubyte.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions Part 2 - Neural Networks in PyTorch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"source": [
"# Define a transform to normalize the data\n",
"transform = transforms.Compose([transforms.ToTensor(),\n",
" transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),\n",
" transforms.Normalize([0.5],[0.5]),\n",
" ])\n",
"# Download and load the training data\n",
"trainset = datasets.MNIST('MNIST_data/', download=True, train=True, transform=transform)\n",
Expand Down Expand Up @@ -415,4 +415,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
4 changes: 2 additions & 2 deletions Part 4 - Fashion-MNIST Exercise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"\n",
"# Define a transform to normalize the data\n",
"transform = transforms.Compose([transforms.ToTensor(),\n",
" transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])\n",
" transforms.Normalize([0.5], [0.5]])\n",
"# Download and load the training data\n",
"trainset = datasets.FashionMNIST('F_MNIST_data/', download=True, train=True, transform=transform)\n",
"trainloader = torch.utils.data.DataLoader(trainset, batch_size=64, shuffle=True)\n",
Expand Down Expand Up @@ -187,4 +187,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
Binary file added __pycache__/helper.cpython-37.pyc
Binary file not shown.