diff --git a/chapter_natural-language-processing/seq2seq.md b/chapter_natural-language-processing/seq2seq.md index c981d38fb16445f835195e5709431172e2f61c83..1eb295341719f2f3426fd4bc9c0b3def5bf3f61e 100644 --- a/chapter_natural-language-processing/seq2seq.md +++ b/chapter_natural-language-processing/seq2seq.md @@ -6,7 +6,12 @@ > 法语输出:“Ils”、“regardent”、“.” -当输入输出都是不定长序列时,我们可以使用编码器—解码器(encoder-decoder)[1] 或者seq2seq模型 [2]。这两个模型本质上都用到了两个循环神经网络,分别叫做编码器和解码器。编码器对应输入序列,解码器对应输出序列。下面我们来介绍编码器—解码器的设计。 +当输入输出都是不定长序列时,我们可以使用编码器—解码器(encoder-decoder)[1] 或者seq2seq模型 [2]。这两个模型本质上都用到了两个循环神经网络,分别叫做编码器和解码器。编码器对应输入序列,解码器对应输出序列。 + + +![编码器—解码器。](../img/seq2seq.svg) + +下面我们来介绍编码器—解码器的设计。 ## 编码器 diff --git a/img/seq2seq.svg b/img/seq2seq.svg new file mode 100644 index 0000000000000000000000000000000000000000..1fbbcbd5a2e241471ee61a52048f941d8d2e74cb --- /dev/null +++ b/img/seq2seq.svg @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + Produced by OmniGraffle 7.7.1 + 2018-07-17 23:39:11 +0000 + + + seq2seq + + + Layer 1 + + + + + + + They + + + + + are + + + + + watching + + + + + <EOS> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <BOS> + + + + + Ils + + + + + regardent + + + + + Ils + + + + + regardent + + + + + <EOS> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编码器 + + + + + 解码器 + + + + + | + + + + +