This commit is contained in:
Glenn Jocher 2019-08-21 00:23:41 +02:00
parent 9dfce6e5de
commit 7046a95d61
1 changed files with 1 additions and 1 deletions

View File

@ -367,7 +367,7 @@ def compute_loss(p, targets, model): # predictions, targets, model
t = torch.zeros_like(pi[..., 5:]) # targets t = torch.zeros_like(pi[..., 5:]) # targets
if nb: if nb:
t[b, a, gj, gi, tcls[i]] = 1.0 t[b, a, gj, gi, tcls[i]] = 1.0
lcls += BCEobj(pi[..., 5:], t) lobj += BCEobj(pi[..., 5:], t)
lbox *= k * h['giou'] lbox *= k * h['giou']
lobj *= k * h['obj'] lobj *= k * h['obj']