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.