未验证 提交 222155cc 编写于 作者: C Cao Ying 提交者: GitHub

Merge pull request #8310 from guoshengCS/fix-fc-bias

Fix the bias of fc when num_flatten_dims is not 1 in fluid layers
...@@ -185,7 +185,7 @@ def fc(input, ...@@ -185,7 +185,7 @@ def fc(input,
helper.append_op( helper.append_op(
type="sum", inputs={"X": mul_results}, outputs={"Out": pre_bias}) type="sum", inputs={"X": mul_results}, outputs={"Out": pre_bias})
# add bias # add bias
pre_activation = helper.append_bias_op(pre_bias) pre_activation = helper.append_bias_op(pre_bias, dim_start=num_flatten_dims)
# add activation # add activation
return helper.append_activation(pre_activation) return helper.append_activation(pre_activation)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册