Validate --task speed CPU fix (#10244)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2022-11-21 16:54:36 +01:00
1 parent 72cad39854
commit be348cc339
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -444,7 +444,7 @@ def main(opt):
else:
weights = opt.weights if isinstance(opt.weights, list) else [opt.weights]
opt.half = True # FP16 for fastest results
opt.half = torch.cuda.is_available() and opt.device != 'cpu' # FP16 for fastest results
if opt.task == 'speed': # speed benchmarks
# python val.py --task speed --data coco.yaml --batch 1 --weights yolov5n.pt yolov5s.pt...
opt.conf_thres, opt.iou_thres, opt.save_json = 0.25, 0.45, False