From 462a796a8068032be69a33c2c3e5282b4c6bf52c Mon Sep 17 00:00:00 2001 From: peterzhang2029 Date: Mon, 11 Dec 2017 20:33:07 +0800 Subject: [PATCH] refine the code in doc --- dssm/README.cn.md | 2 +- dssm/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dssm/README.cn.md b/dssm/README.cn.md index e1bd3cab..e61e48b4 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 8148ea65..c4109ca5 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. -- GitLab