diff --git a/python/paddle/v2/framework/layer_helper.py b/python/paddle/v2/framework/layer_helper.py index 6615bdcd3b1afa493c9ad05c789664818e64d2f2..90540e0336e4caec56e6ee01539704a42b1f627a 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):