Update train.py for val.run(half=amp) (#8804)
Disable FP16 validation if AMP checks fail or amp=False.
This commit is contained in:
1 parent
1e89807d9a
commit
59595c1365
1 file changed
+1
@@ -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,
|
results, maps, _ = val.run(data_dict,
|
||||||
batch_size=batch_size // WORLD_SIZE * 2,
|
batch_size=batch_size // WORLD_SIZE * 2,
|
||||||
imgsz=imgsz,
|
imgsz=imgsz,
|
||||||
|
half=amp,
|
||||||
model=ema.ema,
|
model=ema.ema,
|
||||||
single_cls=single_cls,
|
single_cls=single_cls,
|
||||||
dataloader=val_loader,
|
dataloader=val_loader,
|
||||||
|
|||||||
Reference in new issue
Block a user