漫谈四种神经网络序列解码模型[http://jacoxu.com/?p=1852]
requirements=Keras[https://github.com/fchollet/keras], Seq2Seq[https://github.com/farizrahman4u/seq2seq]
NOTE:
The suggested version of Keras is 0.3.3 or 0.3.2 rather than 1.0.0 and the lasted version, for some old style functions are called in seq2seq.
model - 1: basic encoder-decoder
model - 2: encoder-decoder with feedback
model - 3: encoder-decoder with peek
model - 4: encoder-decoder with attention
results: four encoder-decoder modes
Question: How to change the encoder-decoder modes?
Answering: Change the decoder_mode in Line 144 of the code. For example, you can change decoder_mode = 3
to run the attention mode.