提交 1e21259d 编写于 作者: C caoying03

fix the bug of parsing evaluator in SRL in PaddleBook.

上级 692d2518
...@@ -235,9 +235,9 @@ def __trim_submodel__(old_submodel, layer_names, input_layer_names, ...@@ -235,9 +235,9 @@ def __trim_submodel__(old_submodel, layer_names, input_layer_names,
def parse_network(output_layers, extra_layers=None): def parse_network(output_layers, extra_layers=None):
if not isinstance(output_layers, collections.Sequence): if not isinstance(output_layers, collections.Sequence):
output_layers = [output_layers] output_layers = [output_layers]
if extra_layers is not None and not isinstance(extra_layers, if extra_layers is not None:
collections.Sequence): if not isinstance(extra_layers, collections.Sequence):
extra_layers = [extra_layers] extra_layers = [extra_layers]
else: else:
extra_layers = [] extra_layers = []
......
...@@ -31,7 +31,6 @@ class Topology(object): ...@@ -31,7 +31,6 @@ class Topology(object):
def __init__(self, layers, extra_layers=None): def __init__(self, layers, extra_layers=None):
def __check__(layers): def __check__(layers):
if not isinstance(layers, collections.Sequence): if not isinstance(layers, collections.Sequence):
__check_layer_type__(layers)
layers = [layers] layers = [layers]
for layer in layers: for layer in layers:
__check_layer_type__(layer) __check_layer_type__(layer)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册