Thanks for posting the stack trace.
It seems normalize raises the shape mismatch error.
Could you check how many values you’ve passed to transform.Normalize and the number of channels for each input image?
It seems that you might have used two values for the mean and std in Normalize while your input contains 3 channels as seen here:
x = torch.randn(3, 24, 24)
norm = transforms.Normalize((0.5, 0.5), (0.5, 0.5))
out = norm(x)
> RuntimeError: The size of tensor a (3) must match the size of tensor b (2) at non-singleton dimension 0