keras-team / keras

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

Fixing example code for CategoricalCrossentropy in losses.py file #20523

Closed tilakrayal closed 2 days ago

tilakrayal commented 2 days ago

The example mentioned for the Keras API CategoricalCrossentropy was failing with the error AttributeError: 'list' object has no attribute 'shape'.

codecov-commenter commented 2 days ago

Codecov Report

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

Project coverage is 82.10%. Comparing base (660da94) to head (8125c3d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #20523 +/- ## ======================================= Coverage 82.10% 82.10% ======================================= Files 515 515 Lines 47790 47790 Branches 7486 7486 ======================================= Hits 39238 39238 Misses 6738 6738 Partials 1814 1814 ``` | [Flag](https://app.codecov.io/gh/keras-team/keras/pull/20523/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/20523/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `81.95% <ø> (ø)` | | | [keras-jax](https://app.codecov.io/gh/keras-team/keras/pull/20523/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `65.04% <ø> (ø)` | | | [keras-numpy](https://app.codecov.io/gh/keras-team/keras/pull/20523/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `60.02% <ø> (ø)` | | | [keras-tensorflow](https://app.codecov.io/gh/keras-team/keras/pull/20523/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `66.03% <ø> (ø)` | | | [keras-torch](https://app.codecov.io/gh/keras-team/keras/pull/20523/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `64.96% <ø> (ø)` | | 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: