updates
This commit is contained in:
parent
aa895d2a07
commit
6ab407231d
|
@ -173,8 +173,9 @@ class YOLOLayer(nn.Module):
|
||||||
|
|
||||||
# lconf = k * BCEWithLogitsLoss(pred_conf[mask], mask[mask].float())
|
# lconf = k * BCEWithLogitsLoss(pred_conf[mask], mask[mask].float())
|
||||||
lconf = (k * 10) * BCEWithLogitsLoss(pred_conf, mask.float())
|
lconf = (k * 10) * BCEWithLogitsLoss(pred_conf, mask.float())
|
||||||
|
lconf += k * BCEWithLogitsLoss(pred_conf[mask], mask[mask].float())
|
||||||
|
|
||||||
lcls = (k / 10) * CrossEntropyLoss(pred_cls[mask], torch.argmax(tcls, 1))
|
lcls = (k / 20) * CrossEntropyLoss(pred_cls[mask], torch.argmax(tcls, 1))
|
||||||
# lcls = (k * 10) * BCEWithLogitsLoss(pred_cls[mask], tcls.float())
|
# lcls = (k * 10) * BCEWithLogitsLoss(pred_cls[mask], tcls.float())
|
||||||
else:
|
else:
|
||||||
lx, ly, lw, lh, lcls, lconf = FT([0]), FT([0]), FT([0]), FT([0]), FT([0]), FT([0])
|
lx, ly, lw, lh, lcls, lconf = FT([0]), FT([0]), FT([0]), FT([0]), FT([0]), FT([0])
|
||||||
|
|
Loading…
Reference in New Issue