I think it is strange that we need to remove the state feeding when using the attention.
The other NMT systems initialize the decoder with something coming from the encoder.
For example:
Nematus initialize the decoder with the mean of the encoder outputs
https://github.com/rsennrich/nematus/blob/73037e94884fd2d1c1d18d81686cd1f6ea32d073/nematus/nmt.py#L421-L440
While OpenNMT is passing to the decoder the states returned from the unrolling of the encoder
https://github.com/mattiadg/OpenNMT-py/blob/6bf832170421ca9c3b609ab3cfea22ae5b7fdb4e/onmt/Models.py#L140-L146
At the moment I don't understand the OpenNMT code because I don't know pytorch, but I'll try to understand what they are doing and implement it here.
I think it is strange that we need to remove the state feeding when using the attention.
The other NMT systems initialize the decoder with something coming from the encoder.
For example:
Nematus initialize the decoder with the mean of the encoder outputs
https://github.com/rsennrich/nematus/blob/73037e94884fd2d1c1d18d81686cd1f6ea32d073/nematus/nmt.py#L421-L440
While OpenNMT is passing to the decoder the states returned from the unrolling of the encoder
https://github.com/mattiadg/OpenNMT-py/blob/6bf832170421ca9c3b609ab3cfea22ae5b7fdb4e/onmt/Models.py#L140-L146
At the moment I don't understand the OpenNMT code because I don't know pytorch, but I'll try to understand what they are doing and implement it here.