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

Disable FP16 validation if AMP checks fail or amp=False.
This commit is contained in:
Glenn Jocher authored and GitHub committed 2022-07-31 04:17:39 +02:00
1 parent 1e89807d9a
commit 59595c1365
1 file changed
+1
+1
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,