From 075b629049419f252f3714d8f060e38757f545d0 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 22 Nov 2018 17:16:17 +0100 Subject: [PATCH] updates --- models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models.py b/models.py index fd404375..1b12bd94 100755 --- a/models.py +++ b/models.py @@ -183,7 +183,7 @@ class YOLOLayer(nn.Module): # lconf += k * BCEWithLogitsLoss(pred_conf[~mask], mask[~mask].float()) # Sum loss components - balance_losses_flag = False + balance_losses_flag = True if balance_losses_flag: k = 1 / self.loss_means.clone() loss = (lx * k[0] + ly * k[1] + lw * k[2] + lh * k[3] + lconf * k[4] + lcls * k[5]) / k.mean()