Unverified 提交 3213d871 authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Fix for `dataset_stats()` with updated data.yaml (#3819)

@KalenMike
上级 02719dde
......@@ -1116,7 +1116,7 @@ def dataset_stats(path='coco128.yaml', autodownload=False, verbose=False):
nc = data['nc'] # number of classes
stats = {'nc': nc, 'names': data['names']} # statistics dictionary
for split in 'train', 'val', 'test':
if split not in data:
if data.get(split) is None:
stats[split] = None # i.e. no test set
continue
x = []
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论