在第二节的第四部分,我们提出了RNN的n VS m结构:Encoder-Decoder模型,Encoder-Decoder模型是深度学习中常见的一种模型。在本文中,我们只简单介绍其在文本-文本的应用,比如将英语翻译成汉语,所以该模型也可以称为Seq2Seq 模型。下图为Encoder-Decoder模型的抽象图: 2. 分析 1)Encoder 给定句子对<X,
['挨打', '玩具'] RNN模型结构: NPLM( (C): Embedding(7, 2) (lstm): LSTM(2, 2, batch_first=True) (linear): Linear(in_features=2, out_features=7, bias=True) ) Epoch: 1000 cost= 0.000779 Epoch: 2000 cost= 0.000248 Epoch: 3000 cost= 0.000122 Epoch: 4000 cost= 0.000082 Epoch: ...