From 8e726ca8872a69e97c8f82ea47d4e240c2aba096 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 31 Jul 2022 03:59:25 +0200 Subject: [PATCH] Update train.py for `val.run(half=amp)` Disable FP16 validation if AMP checks fail or amp=False. --- train.py | 1 + 1 file changed, 1 insertion(+) diff --git a/train.py b/train.py index c298692b7335..dc93c22d621a 100644 --- a/train.py +++ b/train.py @@ -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,