diff --git a/train.py b/train.py index c6ad9048..eda88c23 100644 --- a/train.py +++ b/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 diff --git a/utils/utils.py b/utils/utils.py index 52638c0f..0ece2b3c 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -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)