提交 3c09a57e 编写于 作者: X Xin Pan

fix bias

test=develop
上级 c8c3efad
...@@ -261,9 +261,7 @@ class FC(layers.Layer): ...@@ -261,9 +261,7 @@ class FC(layers.Layer):
attrs={"use_mkldnn": False}) attrs={"use_mkldnn": False})
bias_attr = self._helper.bias_attr bias_attr = self._helper.bias_attr
if not bias_attr: if bias_attr:
return
# add bias # add bias
size = list(out.shape[1:]) size = list(out.shape[1:])
if not self._built: if not self._built:
...@@ -277,5 +275,6 @@ class FC(layers.Layer): ...@@ -277,5 +275,6 @@ class FC(layers.Layer):
'Y': [self._b]}, 'Y': [self._b]},
outputs={'Out': [bias_out]}, outputs={'Out': [bias_out]},
attrs={'axis': 1}) attrs={'axis': 1})
out = bias_out
# add activation # add activation
return self._helper.append_activation(bias_out) return self._helper.append_activation(out)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册