Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sections to flax.linen toctree #3073

Merged
merged 1 commit into from
Jun 22, 2023
Merged

Add sections to flax.linen toctree #3073

merged 1 commit into from
Jun 22, 2023

Conversation

cgarciae
Copy link
Collaborator

@cgarciae cgarciae commented May 3, 2023

What does this PR do?

Fixes #3069

  • Splits flax.linen.rst into multiple sections to make the table of content easier to navigate.
  • Creates a new flax_module directive which uses the flax_module.rst template to be able to show the Module subclasses in the same page.
  • Relocates all Module implementations under the Layers category
  • Merges nowrap and compact into the Decoratros category
  • Renames RNN primitives to Recurrent

Preview
Screenshot 2023-05-03 at 4 38 19 PM

Live: https://flax--3073.org.readthedocs.build/en/3073/

@codecov-commenter
Copy link

codecov-commenter commented May 3, 2023

Codecov Report

Merging #3073 (ca86757) into main (4f9f64e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3073   +/-   ##
=======================================
  Coverage   82.19%   82.19%           
=======================================
  Files          54       54           
  Lines        6016     6016           
=======================================
  Hits         4945     4945           
  Misses       1071     1071           

@chiamp
Copy link
Collaborator

chiamp commented May 3, 2023

This is great, thanks for setting this up! Some suggestions:

Consider adding Module methods on the right hand side of the Module page, e.g.:
Screenshot 2023-05-03 at 3 16 27 PM

On the Activation functions page, there is a discrepancy between the left and right hand side list:
Screenshot 2023-05-03 at 3 10 06 PM
Screenshot 2023-05-03 at 3 10 14 PM
Can we remove param_dtype and negative_slope_init as they aren't activation functions?

@cgarciae
Copy link
Collaborator Author

cgarciae commented May 4, 2023

@chiamp I tried to fix the PReLU, however, I don't think we can add the methods from Module to the right hand TOC. Currently it doesn't behave like you suggest either. We could leave it as an issue for the future.

@copybara-service copybara-service bot merged commit 11277dc into main Jun 22, 2023
@copybara-service copybara-service bot deleted the improve-toc branch June 22, 2023 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show the groups for the flax.linen API references TOC
3 participants