From f818b1116875b197ea22bfa39fee6906e27dc155 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..5cc4ffb626a 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 + attrs={'axis': 1}) return tmp def append_activation(self, input_var): -- GitLab