From 2636ee9ff47fda8f3d0def550284c5aa08bb51c1 Mon Sep 17 00:00:00 2001 From: qijun Date: Thu, 19 Oct 2017 15:14:43 -0700 Subject: [PATCH] set correct attr for bias op in fc layer --- python/paddle/v2/framework/layer_helper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/paddle/v2/framework/layer_helper.py b/python/paddle/v2/framework/layer_helper.py index 6615bdcd3b1..90540e0336e 100644 --- a/python/paddle/v2/framework/layer_helper.py +++ b/python/paddle/v2/framework/layer_helper.py @@ -139,7 +139,9 @@ class LayerHelper(object): type='elementwise_add', inputs={'X': [input_var], 'Y': [b]}, - outputs={'Out': [tmp]}) + outputs={'Out': [tmp]}, + # for rowwise add, we should set axis 1 + attr={'axis': 1}) return tmp def append_activation(self, input_var): -- GitLab