Getting 'tensor is not a torch image' for data type <class 'torch.Tensor'>

As the question suggests, I’m trying to convert images to tensor.

X, y = train_sequence[idx]  
        
images = Variable(torch.from_numpy(X)).to(device) # [batch, channel, H, W]
masks = Variable(torch.from_numpy(y)).to(device) 
print(type(images)) ## Output: <class 'torch.Tensor'>


images = transforms.Normalize((0.5, 0.5, 0.5, 0.5, 0.5), (0.5, 0.5, 0.5,0.5, 0.5))(images)
masks =  transforms.Normalize((0.5), (0.5))(masks)

But I get the error at
---> 19 images = transforms.Normalize((0.5, 0.5, 0.5, 0.5, 0.5), (0.5, 0.5, 0.5,0.5, 0.5))(images)

TypeError: tensor is not a torch image.

I think I solved it. I was missing the first parameter.

 images = transforms.Normalize(images,(0.5, 0.5, 0.5, 0.5, 0.5), (0.5, 0.5, 0.5,0.5, 0.5))
 masks =  transforms.Normalize(masks, (0.5), (0.5))