Feature request: optionally sow attention weight in dot_product_attention
#2869
-
It seems that there is no good way to retrieve attention weight using Update: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Any ideas on how to extract attention weight other than rewriting the attention module? @cgarciae |
Beta Was this translation helpful? Give feedback.
-
Hey @JyChang012, sorry for the delay. I see that Tensorflow's MultiHeadAttention has a In the mean time, we do encourage users forking our Modules for their own needs, we try to maintain them readable for this purpose. @marcvanzee WDYT? Should we consider adding this flag? |
Beta Was this translation helpful? Give feedback.
-
This implementation is applied in PR #3529 |
Beta Was this translation helpful? Give feedback.
This implementation is applied in PR #3529