I have loaded the CIFAR100 dataset on this code I found from pytorch to train and test the CIFAR100 dataset using the VGG11-BN network but I get this error.
Based on the error message you are trying to return PIL.Images instead of tensors (or numpy arrays) and the DataLoader will thus raise the error.
Have a look at the data loading tutorial, which shows how to transform the images to tensors.
PS: you can post code snippets by wrapping them into three backticks ```.