Skip to content

Commit

Permalink
[Fix] Fix the device mismatch error when torch version <1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Ginray committed Feb 27, 2023
1 parent 60d848b commit 52f9205
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmdet3d/models/dense_heads/centerpoint_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def get_targets_single(self,
(gt_bboxes_3d.gravity_center, gt_bboxes_3d.tensor[:, 3:]),
dim=1).to(device)
max_objs = self.train_cfg['max_objs'] * self.train_cfg['dense_reg']
grid_size = torch.tensor(self.train_cfg['grid_size'])
grid_size = torch.tensor(self.train_cfg['grid_size']).to(device)
pc_range = torch.tensor(self.train_cfg['point_cloud_range'])
voxel_size = torch.tensor(self.train_cfg['voxel_size'])

Expand Down

0 comments on commit 52f9205

Please # to comment.