Hello. I am trying to work with the VOC dataset and want to display some images to see if I loaded it properly, however I am getting this error and I don’t understand what is causing it. Here is my code:
transform = transforms.Compose([
    transforms.Resize((224,224)),
    transforms.ToTensor(), 
    transforms.Normalize([0.5], [0.5])
])

data = torchvision.datasets.VOCSegmentation('./data', download=True, transforms = transform)
trainloader = torch.utils.data.DataLoader(data, batch_size=4, shuffle=True, num_workers=2)

import matplotlib.pyplot as plt
import numpy as np

dataiter = iter(trainloader)
(images, labels) = dataiter.next()