Fix detect.py --update list bug (#8783)

Fix detect.py --update

Resolves https://github.com/ultralytics/yolov5/issues/8776
This commit is contained in:
Glenn Jocher authored and GitHub committed 2022-07-29 17:07:24 +02:00
1 parent e309a85586
commit 52d3a9aee1
1 file changed
+1 -1
+1 -1
View File
@@ -210,7 +210,7 @@ def run(
s = f"\n{len(list(save_dir.glob('labels/*.txt')))} labels saved to {save_dir / 'labels'}" if save_txt else ''
LOGGER.info(f"Results saved to {colorstr('bold', save_dir)}{s}")
if update:
strip_optimizer(weights) # update model (to fix SourceChangeWarning)
strip_optimizer(weights[0]) # update model (to fix SourceChangeWarning)
def parse_opt():