Does the dataset need to be pre-processed when the image size is not correct?
Original Traceback (most recent call last):
File "/home/zhaoxin/anaconda3/envs/python39/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/home/zhaoxin/anaconda3/envs/python39/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/zhaoxin/anaconda3/envs/python39/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/zhaoxin/projects/LLCM-main/DEEN/data_loader.py", line 28, in __getitem__
img1 = self.transform(img1)
File "/home/zhaoxin/anaconda3/envs/python39/lib/python3.9/site-packages/torchvision/transforms/transforms.py", line 95, in __call__
img = t(img)
File "/home/zhaoxin/anaconda3/envs/python39/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/zhaoxin/anaconda3/envs/python39/lib/python3.9/site-packages/torchvision/transforms/transforms.py", line 688, in forward
i, j, h, w = self.get_params(img, self.size)
File "/home/zhaoxin/anaconda3/envs/python39/lib/python3.9/site-packages/torchvision/transforms/transforms.py", line 647, in get_params
raise ValueError(f"Required crop size {(th, tw)} is larger than input image size {(h, w)}")
ValueError: Required crop size (384, 144) is larger than input image size (276, 148)
Does the dataset need to be pre-processed when the image size is not correct?