Explorar o código

fix the bug in the BCELoss used in Matcher

yjh0410 %!s(int64=2) %!d(string=hai) anos
pai
achega
1fe1920305
Modificáronse 1 ficheiros con 0 adicións e 1 borrados
  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()