Browse Source

fix the bug in the BCELoss used in Matcher

yjh0410 2 years ago
parent
commit
1fe1920305
1 changed files with 0 additions and 1 deletions
  1. 0 1
      models/detectors/rtcdet/matcher.py

+ 0 - 1
models/detectors/rtcdet/matcher.py

@@ -44,7 +44,6 @@ class AlignedSimOTA(object):
         with torch.cuda.amp.autocast(enabled=False):
             # [Mp, C] -> [N, Mp, C]
             cls_preds_expand = cls_preds.unsqueeze(0).repeat(num_gt, 1, 1)
-            cls_preds_expand = torch.ones_like(cls_preds_expand) * torch.tensor(float("nan")).to(cls_preds_expand.device)
             score_preds = torch.sigmoid(cls_preds_expand)
             # prepare cls_target
             cls_targets = F.one_hot(tgt_labels.long(), self.num_classes).float()