Data_loader results in "set" calling error

11 Views Asked by At
train_data_path = '/content/gdrive/MyDrive/dataset/train'

train_data = datasets.ImageFolder(root=train_data_path, transform=data_transforms)
train_data_loader = torch.utils.data.DataLoader(train_data, batch_size=8, shuffle=True)



for xs, ts in train_data_loader:
  print(xs)
  print(ts) 

I'm currently trying to shuffle and transform images in a folder to a dataset of tensors. One issue I'm facing is that this results in a set callable error, and I'm very confused as to why this is happening. The path specified contains a subfolder of images.

0

There are 0 best solutions below