I got that error during running train.py. I couldn't know how to solve it
This is also the trace back:
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\user\anaconda3\envs\endo\lib\site-packages\torch\utils\data_utils\worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\user\anaconda3\envs\endo\lib\site-packages\torch\utils\data_utils\fetch.py", line 52, in fetch
return self.collate_fn(data)
File "C:\Users\user\Desktop\TR-MISR-master\src\utils.py", line 65, in call
return self.collateFunction(batch)
File "C:\Users\user\Desktop\TR-MISR-master\src\utils.py", line 118, in collateFunction
padded_lr_batch = torch.stack(lr_batch, dim=0)
RuntimeError: stack expects each tensor to be equal size, but got [24, 32, 64] at entry 0 and [24, 64, 32] at entry 1
This problem looks like a DataLoader issue. Please double check the data size. If the image is not square in size, you may need to add code for the DataLoader.
I got that error during running train.py. I couldn't know how to solve it
This is also the trace back: RuntimeError: Caught RuntimeError in DataLoader worker process 0. Original Traceback (most recent call last): File "C:\Users\user\anaconda3\envs\endo\lib\site-packages\torch\utils\data_utils\worker.py", line 302, in _worker_loop data = fetcher.fetch(index) File "C:\Users\user\anaconda3\envs\endo\lib\site-packages\torch\utils\data_utils\fetch.py", line 52, in fetch return self.collate_fn(data) File "C:\Users\user\Desktop\TR-MISR-master\src\utils.py", line 65, in call return self.collateFunction(batch) File "C:\Users\user\Desktop\TR-MISR-master\src\utils.py", line 118, in collateFunction padded_lr_batch = torch.stack(lr_batch, dim=0) RuntimeError: stack expects each tensor to be equal size, but got [24, 32, 64] at entry 0 and [24, 64, 32] at entry 1