From aff100a19c2c3fd8e92000e5f6aa92d82423b1f4 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 29 Jun 2021 12:41:37 +0200 Subject: [PATCH] Fix for `dataset_stats()` with updated data.yaml @KalenMike --- utils/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/datasets.py b/utils/datasets.py index 4658dc524be0..c2859a148106 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -1116,7 +1116,7 @@ def round_labels(labels): 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 = []