Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Conversation

@EugKar
Copy link
Contributor

@EugKar EugKar commented Jun 12, 2019

Sometimes, attention weights may be useful for explaining model's results, visualization, etc. At speech recognition, encoder-decoder attention may be used for time alignment of waveform with recognized phonemes. In old releases, or without fast decoding, the attention is stored at attention_weights, but it has been broken at fast decoding mode: #898 , #917 .
This PR returns weights in cache["attention_history"], works in both Eager and Graph modes.

@googlebot googlebot added the cla: yes PR author has signed CLA label Jun 12, 2019
Copy link
Contributor

@lukaszkaiser lukaszkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lukaszkaiser lukaszkaiser merged commit 0964f5c into tensorflow:master Jun 20, 2019
@lukaszkaiser
Copy link
Contributor

Thanks for correcting this! I had to tweak a few things, but hopefully it all works now. Thanks again!

tensorflow-copybara pushed a commit that referenced this pull request Jun 20, 2019
PiperOrigin-RevId: 254119136
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes PR author has signed CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants