From a125ef1abd699adac966868dd8d02ff06a61ccfd Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Wed, 5 Apr 2017 16:40:47 +0800 Subject: [PATCH] Fix unittest --- python/paddle/v2/config_base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/paddle/v2/config_base.py b/python/paddle/v2/config_base.py index 96a1c70eded..cb98866d874 100644 --- a/python/paddle/v2/config_base.py +++ b/python/paddle/v2/config_base.py @@ -117,7 +117,9 @@ class Layer(object): continue layer.to_proto(context=context) - if self.use_context_name(): + if self.context_name() is None: + return ret_val + elif self.use_context_name(): return context[self.context_name()] else: return context[self.name] -- GitLab