updates
This commit is contained in:
parent
54d1da904c
commit
7500471526
|
@ -160,8 +160,8 @@ class YOLOLayer(nn.Module):
|
|||
lh = 5 * MSELoss(h[mask], th[mask])
|
||||
lconf = 1.5 * BCEWithLogitsLoss1(pred_conf[mask], mask[mask].float())
|
||||
|
||||
lcls = nM * CrossEntropyLoss(pred_cls[mask], torch.argmax(tcls, 1))
|
||||
# lcls = BCEWithLogitsLoss1(pred_cls[mask], tcls.float())
|
||||
# lcls = nM * CrossEntropyLoss(pred_cls[mask], torch.argmax(tcls, 1))
|
||||
lcls = nM * BCEWithLogitsLoss2(pred_cls[mask], tcls.float())
|
||||
else:
|
||||
lx, ly, lw, lh, lcls, lconf = FT([0]), FT([0]), FT([0]), FT([0]), FT([0]), FT([0])
|
||||
|
||||
|
|
Loading…
Reference in New Issue