Is there any way in OpenNMT PyTorch version to save attention weights of each translated sentence.
Although I found a thread for a similar issue, it’s for lua version. In lua direct -save_attention parameter to save the values to a file.
Can anyone guide me on how to do it for PyTorch version??
I want something like:
1 ||| source sentence ||| score ||| target sentence tokenized ||| number number
Matrix of weights.
Many Thanks in Advance