You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the command python tools/train.py configs/tr3d/tr3d_s3dis-3d-5class.py to train, the following error appears in file tr3d_head.py 189.
RuntimeError
torch.cat(): expected a non-empty list of Tensors
File "/mmdetection3d/mmdet3d/models/dense_heads/tr3d_head.py", line 189, in _loss
bbox_loss=torch.mean(torch.cat(bbox_losses)),
File "/mmdetection3d/mmdet3d/models/dense_heads/tr3d_head.py", line 195, in forward_train
gt_bboxes, gt_labels, img_metas)
File "/mmdetection3d/mmdet3d/models/detectors/mink_single_stage.py", line 88, in forward_train
img_metas)
File "/mmdetection3d/mmdet3d/models/detectors/base.py", line 60, in forward
return self.forward_train(**kwargs)
File "/mmdetection3d/mmdet3d/apis/train.py", line 319, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/mmdetection3d/mmdet3d/apis/train.py", line 351, in train_model
meta=meta)
File "/mmdetection3d/tools/train.py", line 259, in main
meta=meta)
File "/mmdetection3d/tools/train.py", line 263, in
main()
RuntimeError: torch.cat(): expected a non-empty list of Tensors
After debugging, it was found that bbox_losses and gt_bboxes was empty, causing this error to occur. How should it be corrected?
The text was updated successfully, but these errors were encountered:
Hi @advancing-panda ,
Did you make any modification in the code?
Looks like this error can happen with the very low probability if all 16 scenes per batch have no ground truth objects. In this case you can check if len(bbox_losses) == 0 then just return zero tensor here.
When I use the command python tools/train.py configs/tr3d/tr3d_s3dis-3d-5class.py to train, the following error appears in file tr3d_head.py 189.
RuntimeError
torch.cat(): expected a non-empty list of Tensors
File "/mmdetection3d/mmdet3d/models/dense_heads/tr3d_head.py", line 189, in _loss
bbox_loss=torch.mean(torch.cat(bbox_losses)),
File "/mmdetection3d/mmdet3d/models/dense_heads/tr3d_head.py", line 195, in forward_train
gt_bboxes, gt_labels, img_metas)
File "/mmdetection3d/mmdet3d/models/detectors/mink_single_stage.py", line 88, in forward_train
img_metas)
File "/mmdetection3d/mmdet3d/models/detectors/base.py", line 60, in forward
return self.forward_train(**kwargs)
File "/mmdetection3d/mmdet3d/apis/train.py", line 319, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/mmdetection3d/mmdet3d/apis/train.py", line 351, in train_model
meta=meta)
File "/mmdetection3d/tools/train.py", line 259, in main
meta=meta)
File "/mmdetection3d/tools/train.py", line 263, in
main()
RuntimeError: torch.cat(): expected a non-empty list of Tensors
After debugging, it was found that bbox_losses and gt_bboxes was empty, causing this error to occur. How should it be corrected?
The text was updated successfully, but these errors were encountered: