提交 fb45cc35 编写于 作者: Q qiaolongfei

refine code

上级 108f195d
...@@ -32,8 +32,7 @@ class Topology(object): ...@@ -32,8 +32,7 @@ class Topology(object):
__check_layer_type__(layers) __check_layer_type__(layers)
layers = [layers] layers = [layers]
for layer in layers: for layer in layers:
if not isinstance(layer, v2_layer.LayerV2): __check_layer_type__(layer)
raise ValueError('layer should have type paddle.layer.Layer')
self.layers = layers self.layers = layers
self.__model_config__ = v2_layer.parse_network(*layers) self.__model_config__ = v2_layer.parse_network(*layers)
assert isinstance(self.__model_config__, ModelConfig) assert isinstance(self.__model_config__, ModelConfig)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册