I am going through the ant bees transfer learning tutorial, and I am trying to get a deep understanding of preparing data in Pytorch. I removed all of the transformations except ToTensor, but it seems
you need to make sure images need to be resized?
So I am trying this:
train_data = ImageFolder(root = os.path.join(root_dir, ‘train’), transform=transforms.Compose([Resize(256),ToTensor()]))
train_loader = iter(dataloader)
x,y = next(train_loader)
However I am still getting a runtime Error:
`Sizes of tensors must match except in dimension 0. Got 371 and 375 in dimension 2 at ..\aten \src\TH/generic/THTensor.cpp:711`
Preformatted text
Is there another transformation I need to add?
PS: Is there no preview button on these boards? I am trying out different formating options but I can’t seem to find a way to preview the options. Thank you. .