skyhehe123 / SA-SSD

SA-SSD: Structure Aware Single-stage 3D Object Detection from Point Cloud (CVPR 2020)
492 stars 106 forks source link

RuntimeError:all input tensors must be on the same device. received cuda:0 and cpu #90

Open june2678 opened 3 years ago

june2678 commented 3 years ago

my pytorch version is 1.7.1 cuda version = 11.1 (because of RTX 3090) when run python train.py ../configs/car_cfg.py

RuntimEerror:all input tensors must be on the same device. received cuda:0 and cpu the error is in this line "/SA-SSD-master/mmdet/models/single_stage_heads/ssd_rotate_head.py" line 368 in get_guided_anchors top_labels = torch.cat([gt_lbls,top_labels],0)

june2678 commented 3 years ago

maybe I solve it add top_labels = top_labels.to("cuda") before top_labels = torch.cat([gt_lbls,top_labels],0)