keras-team / keras

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

Update python example dtype in string_lookup.py #19672

Closed SuryanarayanaY closed 1 week ago

SuryanarayanaY commented 1 week ago

The string lookup layer outputs int64 dtype when output_mode is one_hot or multi_hot or count. But the documentation example shows the output as float32 instead of int64. Hence Updating the same.

Fixes #19660 .

codecov-commenter commented 1 week ago

Codecov Report

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

Project coverage is 78.39%. Comparing base (d84c6ee) to head (f9f527f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #19672 +/- ## ======================================= Coverage 78.39% 78.39% ======================================= Files 498 498 Lines 45526 45526 Branches 8396 8396 ======================================= Hits 35688 35688 Misses 8100 8100 Partials 1738 1738 ``` | [Flag](https://app.codecov.io/gh/keras-team/keras/pull/19672/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/19672/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `78.23% <ø> (ø)` | | | [keras-jax](https://app.codecov.io/gh/keras-team/keras/pull/19672/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `62.02% <ø> (ø)` | | | [keras-numpy](https://app.codecov.io/gh/keras-team/keras/pull/19672/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `56.33% <ø> (+<0.01%)` | :arrow_up: | | [keras-tensorflow](https://app.codecov.io/gh/keras-team/keras/pull/19672/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `63.37% <ø> (ø)` | | | [keras-torch](https://app.codecov.io/gh/keras-team/keras/pull/19672/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `62.03% <ø> (ø)` | | 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.