Current code in Parts 2-6 causes an error in PyTorch 1.1. transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)), ]) RuntimeError: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28] I made the following change and it worked for PyTorch 0.4 and 1.1: transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize([0.5], [0.5])])
Current code in Parts 2-6 causes an error in PyTorch 1.1.
transform = transforms.Compose([transforms.ToTensor(),
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
])
RuntimeError: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28]
I made the following change and it worked for PyTorch 0.4 and 1.1:
transform = transforms.Compose([transforms.ToTensor(),
transforms.Normalize([0.5], [0.5])])