RNN-based Encoder/Decoder Model Training Algorithm