Ysnower / bicubic-plusplus

An unofficial bicubic++ repo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IndexError: list index out of range

blingsr opened this issue · comments

Hi! Thanks for your coke.
But I meet some problems as follow:

(bicubic++2) chenz@chenz-System-Product-Name:~/bicubic-plusplus$ python train.py
/home/chenz/anaconda3/envs/bicubic++2/lib/python3.7/site-packages/torch/utils/data/dataloader.py:557: UserWarning: This DataLoader will create 24 worker processes in total. Our suggested max number of worker in current system is 8, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
cpuset_checked))
Traceback (most recent call last):
File "train.py", line 119, in
for k, return_dict in enumerate(train_data):
File "/home/chenz/anaconda3/envs/bicubic++2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 628, in next
data = self._next_data()
File "/home/chenz/anaconda3/envs/bicubic++2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1333, in _next_data
return self._process_data(data)
File "/home/chenz/anaconda3/envs/bicubic++2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1359, in _process_data
data.reraise()
File "/home/chenz/anaconda3/envs/bicubic++2/lib/python3.7/site-packages/torch/_utils.py", line 543, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/chenz/anaconda3/envs/bicubic++2/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/home/chenz/anaconda3/envs/bicubic++2/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/chenz/anaconda3/envs/bicubic++2/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 58, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/chenz/bicubic-plusplus/training/dataset.py", line 66, in getitem
img_hr, img_lr = self.imread_modcrop(self.hr_images[item], self.lr_images[item], is_train=self.is_train)
IndexError: list index out of range

Maybe you can set the breakpoint on line 68,confirm the length of self.hr_images and self.lr_images, and then check whether the list index is out of range
2023-07-13 16-50-59