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

请问显示keyerror是什么问题 #572

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TGU1912
Copy link

@TGU1912 TGU1912 commented Nov 23, 2020

按照您的步骤操作,运行完python train.py --config=yolact_hrnet18_config 之后显示这个,您知道是什么问题吗

Traceback (most recent call last):
File "train.py", line 504, in
train()
File "train.py", line 270, in train
for datum in data_loader:
File "/home/zy/anaconda3/envs/mmcv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 345, in next
data = self._next_data()
File "/home/zy/anaconda3/envs/mmcv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/zy/anaconda3/envs/mmcv/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/zy/anaconda3/envs/mmcv/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/zy/hrnet/data/coco.py", line 94, in getitem
im, gt, masks, h, w, num_crowds = self.pull_item(index)
File "/home/zy/hrnet/data/coco.py", line 153, in pull_item
target = self.target_transform(target, width, height)
File "/home/zy/hrnet/data/coco.py", line 42, in call
label_idx = self.label_map[label_idx] - 1
KeyError: 9

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

Successfully merging this pull request may close these issues.

1 participant