From 386973df734135196673362815f287c039994b39 Mon Sep 17 00:00:00 2001 From: xiongf Date: Wed, 19 Jun 2024 15:38:50 +0800 Subject: [PATCH] =?UTF-8?q?bug=EF=BC=9Adevice=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mmrotate/core/bbox/assigners/convex_assigner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmrotate/core/bbox/assigners/convex_assigner.py b/mmrotate/core/bbox/assigners/convex_assigner.py index 65053ef6f..bebd26676 100644 --- a/mmrotate/core/bbox/assigners/convex_assigner.py +++ b/mmrotate/core/bbox/assigners/convex_assigner.py @@ -116,7 +116,7 @@ def assign(self, assigned_gt_inds = points.new_zeros((num_points, ), dtype=torch.long) # stores the assigned gt dist (to this point) of each point assigned_gt_dist = points.new_full((num_points, ), float('inf')) - points_range = torch.arange(points.shape[0]) + points_range = torch.arange(points.shape[0],device=points.device) for idx in range(num_gts): gt_lvl = gt_bboxes_lvl[idx]