i have this error
TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class ‘PIL.Image.Image’>
i can not fixed it?
I think @ptrblck had asked you to pass this transforms to the dataset set class when you are initializing it, there should be a parameter taking transforms if not that then what you have done will also work.
Yes, @shalom_p is right and if you are using torchvision.datasets.CIFAR10, just it to the transform argument. If you are using another class definition, check its docs.