Thank you for your answer Tony-Y. I’ve tested two different code [1] and [2] and they work if I execute the notebooks whithout any changes.
What I’ve tried next is to implement minimal changes to these two codes in order to get an One Hot Encoded input and a 1-d output and in both case the output is near zero …
I’m joining my modified notebook 1 of tutorial [2], hoping that someone could explain me why pytorch gradient is not working in this case.
[1] Seq2seq translation - Pytorch documentation 2
[2] bentrevett/pytorch-seq2seq - Github 1
Thank you for your time