diff --git a/dssm/README.cn.md b/dssm/README.cn.md index e1bd3cab89a2f76752c946b5a54cc250def9441b..e61e48b4a3eb635d4e8efa9ce45b08f8bb1bb56b 100644 --- a/dssm/README.cn.md +++ b/dssm/README.cn.md @@ -131,7 +131,7 @@ def create_cnn(self, emb, prefix=''): conv_3 = create_conv(3, self.dnn_dims[1], "cnn") conv_4 = create_conv(4, self.dnn_dims[1], "cnn") - return conv_3, conv_4 + return paddle.layer.concat(input=[conv_3, conv_4]) ``` CNN 接受词向量序列,通过卷积和池化操作捕捉到原始句子的关键信息,最终输出一个语义向量(可以认为是句子向量)。 diff --git a/dssm/README.md b/dssm/README.md index 8148ea6557183df1446b98ed6d3a4da1f92c6438..c4109ca5b556cd42fc286dbb889f36589aef332f 100644 --- a/dssm/README.md +++ b/dssm/README.md @@ -107,7 +107,7 @@ def create_cnn(self, emb, prefix=''): conv_3 = create_conv(3, self.dnn_dims[1], "cnn") conv_4 = create_conv(4, self.dnn_dims[1], "cnn") - return conv_3, conv_4 + return paddle.layer.concat(input=[conv_3, conv_4]) ``` CNN accepts the word sequence of the embedding table, then process the data by convolution and pooling, and finally outputs a semantic vector.