diff --git a/train.py b/train.py index 34658fd3..a38b9775 100644 --- a/train.py +++ b/train.py @@ -60,9 +60,6 @@ def train(): hyp['cls_pw'] = 1. hyp['obj_pw'] = 1. - if img_size > 320: # scale hyp['obj'] by img_size (evolved at 320) - hyp['obj'] *= img_size / 320. - # Initialize init_seeds() multi_scale = opt.multi_scale @@ -422,6 +419,9 @@ if __name__ == '__main__': print(opt) device = torch_utils.select_device(opt.device, apex=mixed_precision) + # scale hyp['obj'] by img_size (evolved at 320) + hyp['obj'] *= opt.img_size / 320. + tb_writer = None if not opt.evolve: # Train normally try: