From cf9cd34ebee41d2fb6a3022af77ec1d8e1659b6f Mon Sep 17 00:00:00 2001 From: peterzhang2029 Date: Fri, 1 Dec 2017 16:54:49 +0800 Subject: [PATCH] fix shared params --- nested_sequence/text_classification/network_conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nested_sequence/text_classification/network_conf.py b/nested_sequence/text_classification/network_conf.py index b4c40669..cc7b3983 100644 --- a/nested_sequence/text_classification/network_conf.py +++ b/nested_sequence/text_classification/network_conf.py @@ -15,11 +15,13 @@ def cnn_cov_group(group_input, hidden_size): conv4 = paddle.networks.sequence_conv_pool( 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( input=[conv3, conv4], size=hidden_size, - param_attr=paddle.attr.ParamAttr(name='_cov_value_weight'), - bias_attr=paddle.attr.ParamAttr(name='_cov_value_bias'), + param_attr=[fc_param_attr, fc_param_attr], + bias_attr=fc_bias_attr, act=paddle.activation.Linear()) return linear_proj -- GitLab