I am getting following error when I preprocess the data with scaling option:
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 518 and 338 in dimension 2 at /pytorch/aten/src/TH/generic/THTensor.cpp:711
When I set scaling=None, model trains properly. I searched online and found out that scaling the images in a batch randomly will result in different Height and Width for each image, and hence, we will have to write and pass a custom collate function to dataloader.
Has anyone else also faced the same issue?
I am getting following error when I preprocess the data with scaling option:
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 518 and 338 in dimension 2 at /pytorch/aten/src/TH/generic/THTensor.cpp:711
When I set scaling=None, model trains properly. I searched online and found out that scaling the images in a batch randomly will result in different Height and Width for each image, and hence, we will have to write and pass a custom collate function to dataloader. Has anyone else also faced the same issue?