From 6ab407231d90804d9e0e25b7ce51e2f95b989295 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 19 Nov 2018 12:55:03 +0100 Subject: [PATCH] updates --- models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models.py b/models.py index bdf1a882..8e175d2e 100755 --- a/models.py +++ b/models.py @@ -173,8 +173,9 @@ class YOLOLayer(nn.Module): # lconf = k * BCEWithLogitsLoss(pred_conf[mask], mask[mask].float()) lconf = (k * 10) * BCEWithLogitsLoss(pred_conf, mask.float()) + lconf += k * BCEWithLogitsLoss(pred_conf[mask], mask[mask].float()) - lcls = (k / 10) * CrossEntropyLoss(pred_cls[mask], torch.argmax(tcls, 1)) + lcls = (k / 20) * CrossEntropyLoss(pred_cls[mask], torch.argmax(tcls, 1)) # lcls = (k * 10) * BCEWithLogitsLoss(pred_cls[mask], tcls.float()) else: lx, ly, lw, lh, lcls, lconf = FT([0]), FT([0]), FT([0]), FT([0]), FT([0]), FT([0])