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

Fix the bias of fc when num_flatten_dims is not 1 in fluid layers
emailweixu-patch-1
Cao Ying 7 years ago committed by GitHub
commit 222155ccbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -185,7 +185,7 @@ def fc(input,
helper.append_op(
type="sum", inputs={"X": mul_results}, outputs={"Out": pre_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
return helper.append_activation(pre_activation)

Loading…
Cancel
Save