From a587d39cd447b85219e761734b5f1d5cb30197d8 Mon Sep 17 00:00:00 2001 From: NanoCode012 Date: Thu, 25 Jun 2020 01:37:09 +0700 Subject: [PATCH] Fixed train.py SyntaxError due to last commit (#1336) Fixed unexpected character after line continuation character on line 148,150, and 151 --- train.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/train.py b/train.py index 5abcacf0..705b5198 100644 --- a/train.py +++ b/train.py @@ -145,10 +145,9 @@ def train(hyp): load_darknet_weights(model, weights) if opt.freeze_layers: - output_layer_indices = [idx - 1 for idx, module in enumerate(model.module_list) \ - if isinstance(module, YOLOLayer)] - freeze_layer_indices = [x for x in range(len(model.module_list)) if\ - (x not in output_layer_indices) and \ + output_layer_indices = [idx - 1 for idx, module in enumerate(model.module_list) if isinstance(module, YOLOLayer)] + freeze_layer_indices = [x for x in range(len(model.module_list)) if + (x not in output_layer_indices) and (x - 1 not in output_layer_indices)] for idx in freeze_layer_indices: for parameter in model.module_list[idx].parameters():