From 9337b192244620b0e647e6bda8a9f7d6ff60d984 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 31 Jul 2022 04:17:39 +0200 Subject: [PATCH] Update train.py for `val.run(half=amp)` (#8804) 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,