Dear All,
This relates to one of my earlier posts (Custom data loader and label encoding with CIFAR-10), but it deserves a new thread.
When I iterate the Data set during training, like so:

for i, (inputs, labels) in enumerate(train_loader):
print (type(inputs))
print (type(labels))
print (“Label:” + str(labels))

The labels return 4 items as a tuple instead of only one Item (for instance, “dog”). I understand that the problem is with my data loader however I can not seem to figure out which line of code is the culprit.
The full code is here:
https://github.com/QuantScientist/Deep-Learning-Boot-Camp/blob/master/day%2002%20PyTORCH%20and%20PyCUDA/PyTorch/21-PyTorch-CIFAR-10-Custom-data-loader-from-scratch.ipynb 19
And this is the exception:

21-PyTorch-CIFAR-10-Custom-data-loader-from-scratch.jpg997×1098 194 KB

Many thanks for any help!