Skip to content

Commit

Permalink
Update train.py for val.run(half=amp) (#8804)
Browse files Browse the repository at this point in the history
Disable FP16 validation if AMP checks fail or amp=False.
  • Loading branch information
glenn-jocher committed Jul 31, 2022
1 parent 1e89807 commit 59595c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ def train(hyp, opt, device, callbacks): # hyp is path/to/hyp.yaml or hyp dictio
results, maps, _ = val.run(data_dict,
batch_size=batch_size // WORLD_SIZE * 2,
imgsz=imgsz,
half=amp,
model=ema.ema,
single_cls=single_cls,
dataloader=val_loader,
Expand Down

0 comments on commit 59595c1

Please sign in to comment.