updates
This commit is contained in:
parent
8c5ebdf055
commit
f430ddb103
|
@ -23,11 +23,18 @@ def parse_model_cfg(path):
|
||||||
else:
|
else:
|
||||||
mdefs[-1][key] = val.strip()
|
mdefs[-1][key] = val.strip()
|
||||||
|
|
||||||
# Print cfg fields
|
# Check all fields are supported
|
||||||
# f = []
|
supported = ['type', 'batch_normalize', 'filters', 'size', 'stride', 'pad', 'activation', 'layers', 'groups',
|
||||||
# for x in mdefs[1:]:
|
'from', 'mask', 'anchors', 'classes', 'num', 'jitter', 'ignore_thresh', 'truth_thresh', 'random',
|
||||||
# [f.append(k) for k in x if k not in f]
|
'stride_x', 'stride_y']
|
||||||
|
|
||||||
|
f = []
|
||||||
|
for x in mdefs[1:]:
|
||||||
|
[f.append(k) for k in x if k not in f]
|
||||||
# print(len(f), 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)
|
||||||
|
|
||||||
return mdefs
|
return mdefs
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue