Traceback (most recent call last):
File "./tools/train.py", line 142, in <module>
main()
File "./tools/train.py", line 138, in main
meta=meta)
File "/home/mmdetection/mmdet/apis/train.py", line 102, in train_detector
meta=meta)
File "/home/mmdetection/mmdet/apis/train.py", line 181, in _dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/root/anaconda3/envs/python367/lib/python3.6/site-packages/mmcv-0.4.2-py3.6-linux-x86_64.egg/mmcv/runner/runner.py", line 359, in run
epoch_runner(data_loaders[i], **kwargs)
File "/root/anaconda3/envs/python367/lib/python3.6/site-packages/mmcv-0.4.2-py3.6-linux-x86_64.egg/mmcv/runner/runner.py", line 263, in train
self.model, data_batch, train_mode=True, **kwargs)
File "/home/mmdetection/mmdet/apis/train.py", line 75, in batch_processor
losses = model(**data)
File "/root/anaconda3/envs/python367/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
result = self.forward(*input, **kwargs)
File "/root/anaconda3/envs/python367/lib/python3.6/site-packages/torch/nn/parallel/distributed.py", line 442, in forward
output = self.module(*inputs[0], **kwargs[0])
File "/root/anaconda3/envs/python367/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
result = self.forward(*input, **kwargs)
File "/home/mmdetection/mmdet/core/fp16/decorators.py", line 75, in new_func
output = old_func(*new_args, **new_kwargs)
File "/home/mmdetection/mmdet/models/detectors/base.py", line 147, in forward
return self.forward_train(img, img_metas, **kwargs)
File "/home/mmdetection/mmdet/models/detectors/cascade_rcnn.py", line 197, in forward_train
*rpn_loss_inputs, gt_bboxes_ignore=gt_bboxes_ignore)
File "/home/mmdetection/mmdet/models/anchor_heads/rpn_head.py", line 51, in loss
gt_bboxes_ignore=gt_bboxes_ignore)
File "/home/mmdetection/mmdet/core/fp16/decorators.py", line 152, in new_func
output = old_func(*new_args, **new_kwargs)
File "/home/mmdetection/mmdet/models/anchor_heads/anchor_head.py", line 205, in loss
cfg=cfg)
File "/home/mmdetection/mmdet/core/utils/misc.py", line 24, in multi_apply
return tuple(map(list, zip(*map_results)))
File "/home/mmdetection/mmdet/models/anchor_heads/anchor_head.py", line 149, in loss_single
cls_score, labels, label_weights, avg_factor=num_total_samples)
File "/root/anaconda3/envs/python367/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
result = self.forward(*input, **kwargs)
File "/home/mmdetection/mmdet/models/losses/ghm_loss.py", line 78, in forward
inds = (g >= edges[i]) & (g < edges[i + 1]) & valid
RuntimeError: Expected object of scalar type Float but got scalar type Half for argument #2 'other'
Hi @NaCl-Ocean ,
This seems to because some input have different types when they are sent to GHM_loss, you might need to find and correct their types to be the same.
Describe the bug when using ghm loss,error occured.
Reproduction
Error traceback