I can’t see what is wrong here. According to the source the images are loaded using either accimage or PIL. PIL converts images to RGB when loading them. I’m not sure what accimage would do, but as far as I can tell PIL is the default.
Maybe one of the transforms is causing trouble.
It is also worth mentioning that torchvision provides a grayscale transform that might be useful. http://pytorch.org/docs/master/torchvision/transforms.html#torchvision.transforms.Grayscale 11