forked from keras-team/keras
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Return Attention Scores when
return_attention_scores=True
(ker…
…as-team#20684) * Fix: Ensure Attention Layer Returns Attention Scores when `return_attention_scores=True` This pull request addresses an issue in the Attention layer where the return_attention_scores parameter wasn't correctly handled in the compute_output_shape method. This fix ensures that attention scores are returned when return_attention_scores=True. ## Changes Made Modified compute_output_shape method to return the shape of both the attention output and the attention scores when return_attention_scores=True. * Formatting * Fixed score return and added unit tests for return_attention_scores=True * Removed debug print statement
- Loading branch information
1 parent
c1316e5
commit df002a9
Showing
2 changed files
with
111 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters