提交 cf9cd34e 编写于 作者: P peterzhang2029

fix shared params

上级 b8256825
...@@ -15,11 +15,13 @@ def cnn_cov_group(group_input, hidden_size): ...@@ -15,11 +15,13 @@ def cnn_cov_group(group_input, hidden_size):
conv4 = paddle.networks.sequence_conv_pool( conv4 = paddle.networks.sequence_conv_pool(
input=group_input, context_len=4, hidden_size=hidden_size) input=group_input, context_len=4, hidden_size=hidden_size)
fc_param_attr = paddle.attr.ParamAttr(name='_cov_value_weight')
fc_bias_attr = paddle.attr.ParamAttr(name='_cov_value_bias')
linear_proj = paddle.layer.fc( linear_proj = paddle.layer.fc(
input=[conv3, conv4], input=[conv3, conv4],
size=hidden_size, size=hidden_size,
param_attr=paddle.attr.ParamAttr(name='_cov_value_weight'), param_attr=[fc_param_attr, fc_param_attr],
bias_attr=paddle.attr.ParamAttr(name='_cov_value_bias'), bias_attr=fc_bias_attr,
act=paddle.activation.Linear()) act=paddle.activation.Linear())
return linear_proj return linear_proj
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册