From 5f9229ecaf3f6d6310e2ecfcfb4ed6ea5b33c629 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 28 Dec 2019 21:58:05 -0800 Subject: [PATCH] updates --- utils/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/utils.py b/utils/utils.py index dcb684b2..6f3dfabf 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -372,8 +372,8 @@ def compute_loss(p, targets, model): # predictions, targets, model # Define criteria BCEcls = nn.BCEWithLogitsLoss(pos_weight=ft([h['cls_pw']]), reduction=red) BCEobj = nn.BCEWithLogitsLoss(pos_weight=ft([h['obj_pw']]), reduction=red) - BCE = nn.BCEWithLogitsLoss() - CE = nn.CrossEntropyLoss() # weight=model.class_weights + BCE = nn.BCEWithLogitsLoss(reduction=red) + CE = nn.CrossEntropyLoss(reduction=red) # weight=model.class_weights if 'F' in arc: # add focal loss g = h['fl_gamma']