Fixed train.py SyntaxError due to last commit (#1336)
Fixed unexpected character after line continuation character on line 148,150, and 151
This commit is contained in:
parent
8a414743e2
commit
a587d39cd4
7
train.py
7
train.py
|
@ -145,10 +145,9 @@ def train(hyp):
|
||||||
load_darknet_weights(model, weights)
|
load_darknet_weights(model, weights)
|
||||||
|
|
||||||
if opt.freeze_layers:
|
if opt.freeze_layers:
|
||||||
output_layer_indices = [idx - 1 for idx, module in enumerate(model.module_list) \
|
output_layer_indices = [idx - 1 for idx, module in enumerate(model.module_list) if isinstance(module, YOLOLayer)]
|
||||||
if isinstance(module, YOLOLayer)]
|
freeze_layer_indices = [x for x in range(len(model.module_list)) if
|
||||||
freeze_layer_indices = [x for x in range(len(model.module_list)) if\
|
(x not in output_layer_indices) and
|
||||||
(x not in output_layer_indices) and \
|
|
||||||
(x - 1 not in output_layer_indices)]
|
(x - 1 not in output_layer_indices)]
|
||||||
for idx in freeze_layer_indices:
|
for idx in freeze_layer_indices:
|
||||||
for parameter in model.module_list[idx].parameters():
|
for parameter in model.module_list[idx].parameters():
|
||||||
|
|
Loading…
Reference in New Issue