diff --git a/nce_cost/network_conf.py b/nce_cost/network_conf.py index f226bc992fff91fa0e578578793212dcd67d6bb0..e7bb1796bf16d7802373b1d0ec479dd9384d6771 100644 --- a/nce_cost/network_conf.py +++ b/nce_cost/network_conf.py @@ -33,7 +33,6 @@ def ngram_lm(hidden_size, emb_size, dict_size, gram_num=4, is_train=True): num_classes=dict_size, param_attr=paddle.attr.Param(name="nce_w"), bias_attr=paddle.attr.Param(name="nce_b"), - act=paddle.activation.Sigmoid(), num_neg_samples=25, neg_distribution=None) else: @@ -41,7 +40,7 @@ def ngram_lm(hidden_size, emb_size, dict_size, gram_num=4, is_train=True): size=dict_size, input=paddle.layer.trans_full_matrix_projection( hidden_layer, param_attr=paddle.attr.Param(name="nce_w")), - act=paddle.activation.Sigmoid(), + act=paddle.activation.Softmax(), bias_attr=paddle.attr.Param(name="nce_b"))