Как показывает вопрос, я пытаюсь преобразовать images
в тензор.
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)
Но я получаю ошибку в ---> 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.