This commit is contained in:
Glenn Jocher
2019-08-21 00:21:36 +02:00
parent 291def2e77
commit 9dfce6e5de
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -367,7 +367,7 @@ def compute_loss(p, targets, model): # predictions, targets, model
t = torch.zeros_like(pi[..., 5:]) # targets
if nb:
t[b, a, gj, gi, tcls[i]] = 1.0
lcls += BCEcls(pi[..., 5:], t)
lcls += BCEobj(pi[..., 5:], t)
lbox *= k * h['giou']
lobj *= k * h['obj']