From eeae43c41475f18f188087291d994503c32ff862 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 28 Jun 2019 00:38:52 +0200 Subject: [PATCH] updates --- models.py | 2 +- utils/parse_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index 9d722505..347264fd 100755 --- a/models.py +++ b/models.py @@ -20,7 +20,7 @@ def create_modules(module_defs): modules = nn.Sequential() if module_def['type'] == 'convolutional': - bn = int(module_def['batch_normalize']) if 'batch_normalize' in module_def else 0 + bn = int(module_def['batch_normalize']) filters = int(module_def['filters']) kernel_size = int(module_def['size']) pad = (kernel_size - 1) // 2 if int(module_def['pad']) else 0 diff --git a/utils/parse_config.py b/utils/parse_config.py index e72d5a79..a25eca3f 100644 --- a/utils/parse_config.py +++ b/utils/parse_config.py @@ -10,7 +10,7 @@ def parse_model_cfg(path): module_defs.append({}) module_defs[-1]['type'] = line[1:-1].rstrip() if module_defs[-1]['type'] == 'convolutional': - module_defs[-1]['batch_normalize'] = 0 + module_defs[-1]['batch_normalize'] = 0 # pre-populate with zeros (may be overwritten later) else: key, value = line.split("=") value = value.strip()