From 39ca655ee2c91a6ff9e14b8f922cf4a335ce837d Mon Sep 17 00:00:00 2001 From: kawabe Date: Tue, 11 Nov 2025 08:01:07 +0000 Subject: [PATCH] fix:issue446 --- rfdetr/models/lwdetr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rfdetr/models/lwdetr.py b/rfdetr/models/lwdetr.py index 95ae7e4..055ee15 100644 --- a/rfdetr/models/lwdetr.py +++ b/rfdetr/models/lwdetr.py @@ -372,6 +372,8 @@ def loss_labels(self, outputs, targets, indices, num_boxes, log=True): pos_ind=[id for id in idx] pos_ind.append(target_classes_o) + cls_iou_func_targets = cls_iou_func_targets.float() + pos_ious_func = pos_ious_func.float() cls_iou_func_targets[pos_ind] = pos_ious_func norm_cls_iou_func_targets = cls_iou_func_targets \ / (cls_iou_func_targets.view(cls_iou_func_targets.shape[0], -1, 1).amax(1, True) + 1e-8)