This commit is contained in:
Glenn Jocher
2020-01-03 11:53:02 -08:00
parent eca1a25dcd
commit 4fe9c90514
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -367,7 +367,7 @@ def compute_loss(p, targets, model): # predictions, targets, model
tcls, tbox, indices, anchor_vec = build_targets(model, targets)
h = model.hyp # hyperparameters
arc = model.arc # # (default, uCE, uBCE) detection architectures
red = 'sum' # Loss reduction (sum or mean)
red = 'mean' # Loss reduction (sum or mean)
# Define criteria
BCEcls = nn.BCEWithLogitsLoss(pos_weight=ft([h['cls_pw']]), reduction=red)