From 2201cb40231b5f6c2847b20223b04b241a7a74ec Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 9 Dec 2019 15:54:46 -0800 Subject: [PATCH] updates --- utils/parse_config.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/utils/parse_config.py b/utils/parse_config.py index 962aa07b..36f943bf 100644 --- a/utils/parse_config.py +++ b/utils/parse_config.py @@ -28,13 +28,11 @@ def parse_model_cfg(path): 'from', 'mask', 'anchors', 'classes', 'num', 'jitter', 'ignore_thresh', 'truth_thresh', 'random', 'stride_x', 'stride_y'] - f = [] + f = [] # fields for x in mdefs[1:]: [f.append(k) for k in x if k not in f] - # print(len(f), f) - for x in f: - assert x in supported, "Unsupported field '%s' in %s. See https://github.com/ultralytics/yolov3/issues/631" % \ - (x, path) + u = [x for x in f if x not in supported] # unsupported fields + assert not any(u), "Unsupported fields %s in %s. See https://github.com/ultralytics/yolov3/issues/631" % (u, path) return mdefs