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

修改类别后遇到RuntimeError: shape '[1, -1, 11]' is invalid for input of size 58140 #34

Open
Guangjun-A opened this issue Jun 29, 2021 · 0 comments

Comments

@Guangjun-A
Copy link

Guangjun-A commented Jun 29, 2021

Traceback (most recent call last):
File "tools/train.py", line 133, in
main()
File "tools/train.py", line 129, in main
meta=meta)
File "/data/jun/mmdetection-mini/tools/../mmdet/apis/train.py", line 104, in train_detector
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/data/jun/mmdetection-mini/tools/../mmdet/cv_core/runner/epoch_based_runner.py", line 124, in run
epoch_runner(data_loaders[i], **kwargs)
File "/data/jun/mmdetection-mini/tools/../mmdet/cv_core/runner/epoch_based_runner.py", line 48, in train
self.run_iter(data_batch, train_mode=True)
File "/data/jun/mmdetection-mini/tools/../mmdet/cv_core/runner/epoch_based_runner.py", line 28, in run_iter
**kwargs)
File "/data/jun/mmdetection-mini/tools/../mmdet/cv_core/parallel/data_parallel.py", line 69, in train_step
return self.module.train_step(*inputs[0], **kwargs[0]) # 然后调用model自己的train_step方法
File "/data/jun/mmdetection-mini/tools/../mmdet/models/detectors/base.py", line 204, in train_step
losses = self(**data)
File "/home/jun/.conda/envs/jun/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/data/jun/mmdetection-mini/tools/../mmdet/models/detectors/base.py", line 138, in forward
return self.forward_train(img, img_metas, **kwargs)
File "/data/jun/mmdetection-mini/tools/../mmdet/models/detectors/single_stage.py", line 95, in forward_train
gt_labels, gt_bboxes_ignore, **kwargs)
File "/data/jun/mmdetection-mini/tools/../mmdet/models/dense_heads/base_dense_head.py", line 54, in forward_train
losses = self.loss(*loss_inputs, gt_bboxes_ignore=gt_bboxes_ignore)
File "/data/jun/mmdetection-mini/tools/../mmdet/models/dense_heads/base_yolo_head.py", line 346, in loss
self.loss_single, pred_maps, target_maps_list, neg_maps_list)
File "/data/jun/mmdetection-mini/tools/../mmdet/det_core/utils/misc.py", line 54, in multi_apply
return tuple(map(list, zip(*map_results)))
File "/data/jun/mmdetection-mini/tools/../mmdet/models/dense_heads/base_yolo_head.py", line 372, in loss_single
1).reshape(num_imgs, -1, self.num_attrib)
RuntimeError: shape '[1, -1, 11]' is invalid for input of size 58140
(jun) jun@lthpc:/data/jun/mmdetection-mini$ RuntimeError: shape '[1, -1, 11]' is invalid for input of size 58140

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

1 participant