updates
This commit is contained in:
parent
4fe9c90514
commit
07c40a3f14
2
train.py
2
train.py
|
@ -446,7 +446,7 @@ if __name__ == '__main__':
|
|||
mixed_precision = False
|
||||
|
||||
# scale hyp['obj'] by img_size (evolved at 320)
|
||||
hyp['obj'] *= opt.img_size / 320.
|
||||
# hyp['obj'] *= opt.img_size / 320.
|
||||
|
||||
tb_writer = None
|
||||
if not opt.evolve: # Train normally
|
||||
|
|
|
@ -367,7 +367,7 @@ def compute_loss(p, targets, model): # predictions, targets, model
|
|||
tcls, tbox, indices, anchor_vec = build_targets(model, targets)
|
||||
h = model.hyp # hyperparameters
|
||||
arc = model.arc # # (default, uCE, uBCE) detection architectures
|
||||
red = 'mean' # Loss reduction (sum or mean)
|
||||
red = 'sum' # Loss reduction (sum or mean)
|
||||
|
||||
# Define criteria
|
||||
BCEcls = nn.BCEWithLogitsLoss(pos_weight=ft([h['cls_pw']]), reduction=red)
|
||||
|
|
Loading…
Reference in New Issue