提交 129912a1 编写于 作者: W Webbley

directly uses bias in fc

上级 9cd4d74d
......@@ -231,15 +231,7 @@ def gin(gw,
output = fluid.layers.fc(output,
size=hidden_size,
bias_attr=False,
bias_attr=True,
param_attr=fluid.ParamAttr(name="%s_w" % name))
bias = fluid.layers.create_parameter(
shape=[hidden_size],
dtype='float32',
is_bias=True,
attr=fluid.ParamAttr(name="%s_b" % name))
output = fluid.layers.elementwise_add(output, bias, act=activation)
return output
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册