The class is fine.
What kind of error do you get?
Your code works in this simple example:
normalize = transforms.Normalize(
        mean=[0.485, 0.456, 0.406],
        std=[0.229, 0.224, 0.225]
)

x = torch.randn(3, 24, 24)
y = normalize(x)