Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list index out of range #5

Closed
wangaixue opened this issue Feb 29, 2020 · 3 comments
Closed

list index out of range #5

wangaixue opened this issue Feb 29, 2020 · 3 comments

Comments

@wangaixue
Copy link

I follow Non-distributed training to train all dataset. but when some time, the programe will interrupt. The question is IndexError: list index out of range. Can you tell me how to solve this question? Is the dataset is something wrong? @huanglianghua Thank you very much

@huanglianghua
Copy link
Owner

@wangaixue Hi, can you provide more details on the reported error? For example, at which line of the code the running stopped?

@wangaixue
Copy link
Author

@huanglianghua the question like this
File "tools/train_qg_rcnn.py", line 103, in
main()
File "tools/train_qg_rcnn.py", line 99, in main
logger=logger)
File "_submodules/mmdetection/mmdet/apis/train.py", line 62, in train_detector
_non_dist_train(model, dataset, cfg, validate=validate)
File "_submodules/mmdetection/mmdet/apis/train.py", line 229, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/wyc/anaconda3/envs/globaltrack/lib/python3.7/site-packages/mmcv/runner/runner.py", line 358, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/wyc/anaconda3/envs/globaltrack/lib/python3.7/site-packages/mmcv/runner/runner.py", line 260, in train
for i, data_batch in enumerate(data_loader):
File "/home/wyc/anaconda3/envs/globaltrack/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/wyc/anaconda3/envs/globaltrack/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/wyc/anaconda3/envs/globaltrack/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/wyc/anaconda3/envs/globaltrack/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/wyc/GlobalTrack/datasets/wrappers.py", line 76, in getitem
item = self.base_dataset[index]
File "_submodules/neuron/neuron/data/datasets/structure.py", line 395, in getitem
return dataset[index]
File "_submodules/neuron/neuron/data/datasets/structure.py", line 79, in getitem
img_x = ops.read_image(img_files[rand_x])
IndexError: list index out of range
I guess the rand_x is out the image_file? Can you help me? very thank you

@wangaixue
Copy link
Author

@huanglianghua I also find this question when i only use the got-10k to train.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants