Could you try to unsqueeze the data sample by using:
x = self.mnist_data[index]
if self.mnist_transform:
    x = self.mnist_transform(x.unsqueeze(0))

I assume this error is thrown, if the channel dimension in your image tensor is missing (MNIST should be a [28, 28] shaped tensor), which is fixed in the latest torchvision version.