From 058bb7f38de5014fffa773a87d4c0ee099489e40 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 2 Sep 2018 12:55:05 +0200 Subject: [PATCH] updates --- models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index f54fd983..117ed30f 100755 --- a/models.py +++ b/models.py @@ -160,8 +160,8 @@ class YOLOLayer(nn.Module): lh = 5 * MSELoss(h[mask], th[mask]) lconf = 1.5 * BCEWithLogitsLoss1(pred_conf[mask], mask[mask].float()) - # lcls = nM * CrossEntropyLoss(pred_cls[mask], torch.argmax(tcls, 1)) - lcls = nM * BCEWithLogitsLoss2(pred_cls[mask], tcls.float()) + lcls = nM * CrossEntropyLoss(pred_cls[mask], torch.argmax(tcls, 1)) + # lcls = nM * BCEWithLogitsLoss2(pred_cls[mask], tcls.float()) else: lx, ly, lw, lh, lcls, lconf = FT([0]), FT([0]), FT([0]), FT([0]), FT([0]), FT([0])