提交 a063fc28 编写于 作者: G guosheng

Fix the bias of fc when num_flatten_dims is not 1 in fluid layers

上级 1185a1b5
...@@ -184,7 +184,7 @@ def fc(input, ...@@ -184,7 +184,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.
先完成此消息的编辑!
想要评论请 注册