transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)) will cause below error:
RuntimeError: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28]
rrrrrr8 made a fix but it does not work
my fix is
transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5), (0.5))])
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)) will cause below error: RuntimeError: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28]
rrrrrr8 made a fix but it does not work my fix is transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5), (0.5))])