From 98484bbe2f02f18e0311f60c04db4b5dd7cf0e3e Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 9 Nov 2018 17:18:37 +0100 Subject: [PATCH] updates --- models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index 3a6f5b13..ab059cfa 100755 --- a/models.py +++ b/models.py @@ -172,8 +172,8 @@ class YOLOLayer(nn.Module): # lconf = k * BCEWithLogitsLoss(pred_conf[mask], mask[mask].float()) lconf = k * BCEWithLogitsLoss(pred_conf, mask.float()) - lcls = k * CrossEntropyLoss(pred_cls[mask], torch.argmax(tcls, 1)) - # lcls = k * BCEWithLogitsLoss(pred_cls[mask], tcls.float()) + # lcls = (k / 10) * CrossEntropyLoss(pred_cls[mask], torch.argmax(tcls, 1)) + lcls = k * 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])