Hi, when I tried to lower the batch size. I got tensor error message from dataset.py. Is there anyway to properly lower the batch size without getting error message? I use rain1400 dataset.
Error message:
File "train.py", line 321, in
main()
File "train.py", line 305, in main
train_kc_stage(model, teacher_networks, ckt_modules, train_loader, optimizer, scheduler, epoch, criterions)
File "train.py", line 99, in train_kc_stage
for target_images, input_images in pBar:
File "/home/nccu/.local/lib/python3.7/site-packages/tqdm-4.64.0-py3.7.egg/tqdm/std.py", line 1195, in iter
for obj in iterable:
File "/home/nccu/anaconda3/envs/twostage/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 628, in next
data = self._next_data()
File "/home/nccu/anaconda3/envs/twostage/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 671, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/nccu/anaconda3/envs/twostage/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 61, in fetch
return self.collate_fn(data)
File "/home/nccu/Jason/Two-stage/utils/dataset.py", line 135, in call
input_images[i] = torch.cat(input_images[i])
RuntimeError: Sizes of tensors must match except in dimension 0. Expected size 224 but got size 175 for tensor number 9 in the list.