-
Notifications
You must be signed in to change notification settings - Fork 6.1k
feat: add Dropout
to Flax UNet
#3894
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
feat: add Dropout
to Flax UNet
#3894
Conversation
The documentation is not available anymore as the PR was closed or merged. |
cc @pcuenca |
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 this! I just have a question about the use of nn.compact
and then we can merge.
@@ -169,6 +169,7 @@ def reshape_batch_dim_to_heads(self, tensor): | |||
tensor = tensor.reshape(batch_size // head_size, seq_len, dim * head_size) | |||
return tensor | |||
|
|||
@nn.compact |
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.
There's already a setup
method in this class, it's a bit weird (to me) that we also use nn.compact
. Would it be feasible to add nn.Dropout
as a module in setup
instead?
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.
Addressed in 364432b
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.
Awesome, many thanks!
* feat: add Dropout to Flax UNet * feat: add @compact decorator * fix: drop nn.compact
* feat: add Dropout to Flax UNet * feat: add @compact decorator * fix: drop nn.compact
What does this PR do?
Fixes #522
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Request for Review: @patrickvonplaten