keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
62.13k stars 19.49k forks source link

`MultiHeadAttention._compute_attention_mask()` always returns a bool … #20511

Closed hertschuh closed 1 week ago

hertschuh commented 1 week ago

…tensor.

Previously, if an non-bool attention_mask was passed and no other mask was passed, the original attention_mask was returned unchanged.

Now, it is always cast to bool.

codecov-commenter commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.10%. Comparing base (b91cfe5) to head (2c0802d). Report is 41 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #20511 +/- ## ========================================== + Coverage 82.01% 82.10% +0.09% ========================================== Files 515 515 Lines 47275 47764 +489 Branches 7422 7480 +58 ========================================== + Hits 38772 39218 +446 - Misses 6706 6734 +28 - Partials 1797 1812 +15 ``` | [Flag](https://app.codecov.io/gh/keras-team/keras/pull/20511/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | Coverage Δ | | |---|---|---| | [keras](https://app.codecov.io/gh/keras-team/keras/pull/20511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `81.95% <100.00%> (+0.09%)` | :arrow_up: | | [keras-jax](https://app.codecov.io/gh/keras-team/keras/pull/20511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `65.03% <100.00%> (+0.12%)` | :arrow_up: | | [keras-numpy](https://app.codecov.io/gh/keras-team/keras/pull/20511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `60.00% <100.00%> (+0.16%)` | :arrow_up: | | [keras-tensorflow](https://app.codecov.io/gh/keras-team/keras/pull/20511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `66.02% <100.00%> (+0.10%)` | :arrow_up: | | [keras-torch](https://app.codecov.io/gh/keras-team/keras/pull/20511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `64.95% <100.00%> (+0.11%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: