Skip to content

Adding documentation to Dropout around rng use #2492

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

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

zaxtax
Copy link
Collaborator

@zaxtax zaxtax commented Sep 29, 2022

Hey, I've been playing with the flax project lately and this is something that tripped me up. I believe I followed the correct documentation standards and hope it makes Dropout 's behaviour more clear.

Fixes #1004

Checklist

  • This PR fixes a minor issue (e.g.: typo or small bug) or improves the docs (you can dismiss the other
    checks if that's the case).
  • This change is discussed in a Github issue/
    discussion (please add a
    link).
  • The documentation and docstrings adhere to the
    documentation guidelines.

@google-cla
Copy link

google-cla bot commented Sep 29, 2022

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
Copy link

Codecov Report

Merging #2492 (ee21f85) into main (cc88a73) will decrease coverage by 0.04%.
The diff coverage is 57.14%.

@@            Coverage Diff             @@
##             main    #2492      +/-   ##
==========================================
- Coverage   78.81%   78.77%   -0.05%     
==========================================
  Files          48       48              
  Lines        5066     5069       +3     
==========================================
  Hits         3993     3993              
- Misses       1073     1076       +3     
Impacted Files Coverage Δ
flax/linen/module.py 92.79% <ø> (ø)
flax/linen/stochastic.py 96.55% <ø> (ø)
flax/training/checkpoints.py 60.93% <40.00%> (-0.43%) ⬇️
flax/serialization.py 69.09% <100.00%> (-0.19%) ⬇️
flax/training/dynamic_scale.py 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@zaxtax zaxtax force-pushed the dropout-docs branch 2 times, most recently from 9a25fcf to d86df63 Compare September 30, 2022 15:20
@cgarciae cgarciae self-assigned this Sep 30, 2022
@8bitmp3 8bitmp3 self-assigned this Oct 7, 2022
@@ -27,6 +27,12 @@
class Dropout(Module):
"""Create a dropout layer.

Note when using `:meth:`Module.apply() <flax.linen.Module.apply>` remember
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copybara-service copybara-service bot merged commit 84b7150 into google:main Oct 10, 2022
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.

Improve documentation for Dropout and rngs argument in linen.Module.apply()
4 participants