It still seems some images might be loaded as grayscale images.
Here is a small code snippet to reproduce your error message:
mean = [0.5, 0.5, 0.5]
std = [0.5, 0.5, 0.5]

trans = transforms.Normalize(mean, std)

x = torch.randn(3, 224, 224) # works
out = trans(x)

y = torch.randn(1, 224, 224) # throws your error
out = trans(y)
> RuntimeError: output with shape [1, 224, 224] doesn't match the broadcast shape [3, 224, 224]