Update train.py for `val.run(half=amp)` ()

Disable FP16 validation if AMP checks fail or amp=False.
pull/8806/head
Glenn Jocher 2022-07-31 04:17:39 +02:00 committed by GitHub
parent 1e89807d9a
commit 59595c1365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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,