keras-team / keras

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

Fix for rendering issues with Keras Layers API Documentation (Convolution and Pooling layers) #19679

Closed pranshupant closed 1 week ago

pranshupant commented 1 week ago

This change adds an extra newline character after the Input shape: and Output shape: sections for docstrings with nested bullet points. This ensures the correct markdown translation on the keras.io website for the convolution and pooling layers which have these bullet points right after these section headings.

Screeenshot of issue for MaxPooling2D from the keras.io website: Screenshot from 2024-05-06 22-26-15

The markdown translation logic in the keras-io repo for docstrings requires an additional \n character. Some layers such as the ConvLSTM and GlobalAveragePooling already do this correctly in their docstrings. This change replicates the correct structure for the docstrings of the pooling and conv layers which have this rendering issue

Screenshot of MaxPooling2D after the fix: Screenshot from 2024-05-06 22-35-38

google-cla[bot] commented 1 week ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

codecov-commenter commented 1 week ago

Codecov Report

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

Project coverage is 78.41%. Comparing base (7a81739) to head (6144aca). Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #19679 +/- ## ========================================== + Coverage 78.40% 78.41% +0.01% ========================================== Files 498 498 Lines 45499 45507 +8 Branches 8377 8379 +2 ========================================== + Hits 35675 35686 +11 + Misses 8093 8091 -2 + Partials 1731 1730 -1 ``` | [Flag](https://app.codecov.io/gh/keras-team/keras/pull/19679/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/19679/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `78.26% <ø> (+0.01%)` | :arrow_up: | | [keras-jax](https://app.codecov.io/gh/keras-team/keras/pull/19679/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `62.04% <ø> (+0.01%)` | :arrow_up: | | [keras-numpy](https://app.codecov.io/gh/keras-team/keras/pull/19679/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `56.41% <ø> (+0.01%)` | :arrow_up: | | [keras-tensorflow](https://app.codecov.io/gh/keras-team/keras/pull/19679/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `63.41% <ø> (+0.01%)` | :arrow_up: | | [keras-torch](https://app.codecov.io/gh/keras-team/keras/pull/19679/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `62.06% <ø> (+0.01%)` | :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.