updates
This commit is contained in:
parent
291def2e77
commit
9dfce6e5de
4
train.py
4
train.py
|
@ -39,8 +39,8 @@ hyp = {'giou': 1.582, # giou loss gain
|
|||
'wh': 0.1857, # wh loss gain
|
||||
'cls': 27.76, # cls loss gain (CE=~1.0, uCE=~20)
|
||||
'cls_pw': 1.446, # cls BCELoss positive_weight
|
||||
'obj': 21.35, # obj loss gain
|
||||
'obj_pw': 3.941, # obj BCELoss positive_weight (*=80 for uBCE with 80 classes)
|
||||
'obj': 21.35, # obj loss gain (*=80 for uBCE with 80 classes)
|
||||
'obj_pw': 3.941, # obj BCELoss positive_weight
|
||||
'iou_t': 0.2635, # iou training threshold
|
||||
'lr0': 0.002324, # initial learning rate
|
||||
'lrf': -4., # final LambdaLR learning rate = lr0 * (10 ** lrf)
|
||||
|
|
|
@ -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']
|
||||
|
|
Loading…
Reference in New Issue