From fb45cc3519b23da0862195bd316370d3f6c17f38 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Fri, 24 Feb 2017 16:17:54 +0800 Subject: [PATCH] refine code --- python/paddle/v2/topology.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/paddle/v2/topology.py b/python/paddle/v2/topology.py index 20fa891d656..9c57f1f8e60 100644 --- a/python/paddle/v2/topology.py +++ b/python/paddle/v2/topology.py @@ -32,8 +32,7 @@ class Topology(object): __check_layer_type__(layers) layers = [layers] for layer in layers: - if not isinstance(layer, v2_layer.LayerV2): - raise ValueError('layer should have type paddle.layer.Layer') + __check_layer_type__(layer) self.layers = layers self.__model_config__ = v2_layer.parse_network(*layers) assert isinstance(self.__model_config__, ModelConfig) -- GitLab