From d1ac56757974a2e0710a4b96071184734d97345e Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Wed, 16 Jan 2019 21:11:55 +0800 Subject: [PATCH] fix test=develop --- python/paddle/fluid/layer_helper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/layer_helper.py b/python/paddle/fluid/layer_helper.py index e0fd44ae31e..ea9953f5814 100644 --- a/python/paddle/fluid/layer_helper.py +++ b/python/paddle/fluid/layer_helper.py @@ -405,7 +405,8 @@ class LayerHelper(object): """ size = list(input_var.shape[dim_start:dim_end]) bias_attr = self.bias_attr - assert bias_attr is not None + if not bias_attr: + return input_var b = self.create_parameter( attr=bias_attr, shape=size, dtype=input_var.dtype, is_bias=True) -- GitLab