updates
This commit is contained in:
parent
7a31f4b288
commit
646a21a5cd
|
@ -159,7 +159,8 @@ class YOLOLayer(nn.Module):
|
||||||
# Compute losses
|
# Compute losses
|
||||||
nT = sum([len(x) for x in targets]) # number of targets
|
nT = sum([len(x) for x in targets]) # number of targets
|
||||||
nM = mask.sum().float() # number of anchors (assigned to targets)
|
nM = mask.sum().float() # number of anchors (assigned to targets)
|
||||||
k = nM / bs
|
k = 1 #nM / bs
|
||||||
|
|
||||||
if nM > 0:
|
if nM > 0:
|
||||||
lxy = k * MSELoss(xy[mask], txy[mask])
|
lxy = k * MSELoss(xy[mask], txy[mask])
|
||||||
lwh = k * MSELoss(wh[mask], twh[mask])
|
lwh = k * MSELoss(wh[mask], twh[mask])
|
||||||
|
|
Loading…
Reference in New Issue