-
Notifications
You must be signed in to change notification settings - Fork 777
docs(nnx): add missing functional args to Conv and LinearGeneral #5174
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @cgarciae , following up on the doc cleanups: this PR fills in some missing arguments in the Conv and LinearGeneral docstrings. Ready for review when you have a moment! |
vfdev-5
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @ayulockedin
I left few comments to improve the docs a bit more.
flax/nnx/nn/linear.py
Outdated
| param_dtype: the dtype passed to parameter initializers (default: float32). | ||
| kernel_init: initializer function for the weight matrix. | ||
| bias_init: initializer function for the bias. | ||
| dot_general: dot product function (default: None). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a note about if none of dot_general or dot_general_cls are provided jax.lax.dot_general is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!!
Co-authored-by: vfdev <vfdev.5@gmail.com>
Co-authored-by: vfdev <vfdev.5@gmail.com>
ayulockedin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the Conv layer docstring that is failing the tests (likely due to line length)
|
@vfdev-5 Thanks for the guidance! I've updated the docstrings to clarify the dot_general fallback and fixed the line wrapping in the Conv layer. All checks have passed. Please let me know if everything looks good! |
What does this PR do?
Description
This PR updates the docstrings for
ConvandLinearGeneralto include functional arguments that were present in__init__but missing from the API reference.Changes
dot_generalanddot_general_clsto theArgslist.conv_general_dilatedto theArgslist.Related Issues
Great, you are contributing to Flax!
Fixes # (issue)
Checklist