diff --git a/Part 2 - Neural Networks in PyTorch.ipynb b/Part 2 - Neural Networks in PyTorch.ipynb index 6d139c0f..b108f606 100644 --- a/Part 2 - Neural Networks in PyTorch.ipynb +++ b/Part 2 - Neural Networks in PyTorch.ipynb @@ -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", diff --git a/Part 3 - Training Neural Networks.ipynb b/Part 3 - Training Neural Networks.ipynb index 190a8cc8..0f24d600 100644 --- a/Part 3 - Training Neural Networks.ipynb +++ b/Part 3 - Training Neural Networks.ipynb @@ -218,7 +218,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", " ])\n", "# Download and load the training data\n", "trainset = datasets.MNIST('MNIST_data/', download=True, train=True, transform=transform)\n", diff --git a/Part 4 - Fashion-MNIST Exercise.ipynb b/Part 4 - Fashion-MNIST Exercise.ipynb index 2928d9b3..77a3a7c7 100644 --- a/Part 4 - Fashion-MNIST Exercise.ipynb +++ b/Part 4 - Fashion-MNIST Exercise.ipynb @@ -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", diff --git a/Part 5 - Inference and Validation.ipynb b/Part 5 - Inference and Validation.ipynb index b5479d9f..fb2768cb 100644 --- a/Part 5 - Inference and Validation.ipynb +++ b/Part 5 - Inference and Validation.ipynb @@ -43,7 +43,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", "# 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", diff --git a/Part 6 - Saving and Loading Models.ipynb b/Part 6 - Saving and Loading Models.ipynb index 293ae1cc..c0105a6a 100644 --- a/Part 6 - Saving and Loading Models.ipynb +++ b/Part 6 - Saving and Loading Models.ipynb @@ -38,7 +38,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", "# 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", diff --git a/Part 7 - Loading Image Data.ipynb b/Part 7 - Loading Image Data.ipynb index 9fe51b4a..365d3859 100644 --- a/Part 7 - Loading Image Data.ipynb +++ b/Part 7 - Loading Image Data.ipynb @@ -120,7 +120,7 @@ "source": [ "If you loaded the data correctly, you should see something like this (your image will be different):\n", "\n", - "" + "" ] }, {