I’m working on Ubuntu 16.04 version and using torch version 1.3.1
It’s that MNIST data set consists of grey images.
transform = transforms.Compose([ transforms.ToTensor(), transforms.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5)), ])
can be changed to
transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5,), (0.5,))])