If I print the class, I get:
print(normalize.__class__)
> <class 'torchvision.transforms.transforms.Normalize'>

As far as I remember this error message might indicate you are passing an image tensor containing a batch dimension.
Could you check that and if it’s the case, pass the tensor as [channels, height, width]?