Dear author:
When using my own image dataset (image size is 600 *600) to train EDSR with the command '--scale 3 --patch size 144 or -- scale 4 --patch size 192, there exited an error:
*Traceback (most recent call last):
File "main.py", line 25, in
t.train()
File "/home/zhangshu/EDSR/src/trainer.py", line 41, in train
for batch, (lr, hr, _, idx_scale) in enumerate(self.loader_train):
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 286, in next
return self._process_next_batch(batch)
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 307, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
RuntimeError: Traceback (most recent call last):
File "/home/zhangshu/EDSR/src/dataloader.py", line 47, in _ms_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/zhangshu/EDSR/src/dataloader.py", line 47, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataset.py", line 81, in getitem
return self.datasets[dataset_idx][sample_idx]
File "/home/zhangshu/EDSR/src/data/srdata.py", line 149, in getitem
pair_t = common.np2Tensor(pair, rgb_range=self.args.rgb_range)
File "/home/zhangshu/EDSR/src/data/common.py", line 57, in np2Tensor
return [_np2Tensor(a) for a in args]
File "/home/zhangshu/EDSR/src/data/common.py", line 57, in
return [_np2Tensor(a) for a in args]
File "/home/zhangshu/EDSR/src/data/common.py", line 52, in _np2Tensor
tensor = torch.from_numpy(np_transpose).float()
RuntimeError: Trying to resize storage that is not resizable at /pytorch/aten/src/TH/generic/THStorage.c:183**
Dear author: When using my own image dataset (image size is 600 *600) to train EDSR with the command '--scale 3 --patch size 144 or -- scale 4 --patch size 192, there exited an error:
*Traceback (most recent call last): File "main.py", line 25, in
t.train()
File "/home/zhangshu/EDSR/src/trainer.py", line 41, in train
for batch, (lr, hr, _, idx_scale) in enumerate(self.loader_train):
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 286, in next
return self._process_next_batch(batch)
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 307, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
RuntimeError: Traceback (most recent call last):
File "/home/zhangshu/EDSR/src/dataloader.py", line 47, in _ms_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/zhangshu/EDSR/src/dataloader.py", line 47, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataset.py", line 81, in getitem
return self.datasets[dataset_idx][sample_idx]
File "/home/zhangshu/EDSR/src/data/srdata.py", line 149, in getitem
pair_t = common.np2Tensor( pair, rgb_range=self.args.rgb_range)
File "/home/zhangshu/EDSR/src/data/common.py", line 57, in np2Tensor
return [_np2Tensor(a) for a in args]
File "/home/zhangshu/EDSR/src/data/common.py", line 57, in
return [_np2Tensor(a) for a in args]
File "/home/zhangshu/EDSR/src/data/common.py", line 52, in _np2Tensor
tensor = torch.from_numpy(np_transpose).float()
RuntimeError: Trying to resize storage that is not resizable at /pytorch/aten/src/TH/generic/THStorage.c:183**
Hoping for your reply! Thank you!