attention-is-all-you-need-pytorch
attention-is-all-you-need-pytorch copied to clipboard
Attention weight plot
Please, how to add Attention weight plot to this code. Thanks in advance
you can get attention weight by this code below,
model.(enc|dec)oder.forward([target sequences], return_attns=True)
and then, as you know, can visualize attention weight by using seaborn, or such like that.
you can get attention weight by this code below,
model.(enc|dec)oder.forward([target sequences], return_attns=True)
and then, as you know, can visualize attention weight by using seaborn, or such like that.
Thanks very much. Please is that line locate in the code: model.(enc|dec)oder.forward([target sequences], return_attns=True)
you can get attention weight by this code below,
model.(enc|dec)oder.forward([target sequences], return_attns=True)
and then, as you know, can visualize attention weight by using seaborn, or such like that.
Is it after training or when training. I'm new in it so i don't really understand how it works. I am trying to get it.