This commit is contained in:
Glenn Jocher 2019-12-09 15:54:46 -08:00
parent 86588f1579
commit 2201cb4023
1 changed files with 3 additions and 5 deletions

View File

@ -28,13 +28,11 @@ def parse_model_cfg(path):
'from', 'mask', 'anchors', 'classes', 'num', 'jitter', 'ignore_thresh', 'truth_thresh', 'random', 'from', 'mask', 'anchors', 'classes', 'num', 'jitter', 'ignore_thresh', 'truth_thresh', 'random',
'stride_x', 'stride_y'] 'stride_x', 'stride_y']
f = [] f = [] # fields
for x in mdefs[1:]: for x in mdefs[1:]:
[f.append(k) for k in x if k not in f] [f.append(k) for k in x if k not in f]
# print(len(f), f) u = [x for x in f if x not in supported] # unsupported fields
for x in f: assert not any(u), "Unsupported fields %s in %s. See https://github.com/ultralytics/yolov3/issues/631" % (u, path)
assert x in supported, "Unsupported field '%s' in %s. See https://github.com/ultralytics/yolov3/issues/631" % \
(x, path)
return mdefs return mdefs