From b202baa31c40db0a2836eea812d06798ae417821 Mon Sep 17 00:00:00 2001 From: Jeremy Hu Date: Thu, 27 Jun 2019 18:35:24 -0400 Subject: [PATCH] update parse_model_cfg() (#350) Removing the two lines for adding batch_normalize key to convolutional layers causes the parsing of the model to break when parsing it in models.py --- utils/parse_config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/parse_config.py b/utils/parse_config.py index a8ce537c..e72d5a79 100644 --- a/utils/parse_config.py +++ b/utils/parse_config.py @@ -9,6 +9,8 @@ def parse_model_cfg(path): if line.startswith('['): # This marks the start of a new block module_defs.append({}) module_defs[-1]['type'] = line[1:-1].rstrip() + if module_defs[-1]['type'] == 'convolutional': + module_defs[-1]['batch_normalize'] = 0 else: key, value = line.split("=") value = value.strip()