What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-09-13 22:37:03
TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class 'PIL.Image.Image'>
The error states that the DataLoader receives a PIL image. This is because there are no transforms made (transform=None) on the image. You can add a transform that creates a tensor from the PIL image by adding transform: from torchvision import transfor... Add solution
Best helpers
Ranking is empty