ptrblck:

loader = torch.utils.data.DataLoader(dataset, batch_size=10)
for data in loader:
    print(data)



Thank you for your help. I am having this problem when I set pin_memory=True on my data loader! I am not sure why this is happening!