-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Implement 2D and 3D alpha_dropout #9073
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
Conversation
soumith
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.
please add tests in test_nn.py for the 2d and 3d variants.
|
+1 for not going with |
|
agree, let's not introduce |
|
Names are now corrected (existing droput*d names are untouched). Tests also seem OK. |
facebook-github-bot
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.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
torch/nn/_functions/dropout.py
Outdated
| b = ctx.noise | ||
| else: | ||
| ctx.noise.bernoulli_(1 - ctx.p) | ||
| a = ((3.09091329228798008 * ctx.p + 1) * (1 - ctx.p)) ** (-0.5) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
math checks out |
facebook-github-bot
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.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: It implements per-channel alpha_dropout. It also creates corresponding function classes and unifies the process of dropout and alpha_dropout. Pull Request resolved: pytorch#9073 Differential Revision: D8727008 Pulled By: ezyang fbshipit-source-id: 9d509f9c5db4e98f7b698cdfc4443505a4d2b331
Summary: It implements per-channel alpha_dropout. It also creates corresponding function classes and unifies the process of dropout and alpha_dropout. Pull Request resolved: pytorch#9073 Differential Revision: D8727008 Pulled By: ezyang fbshipit-source-id: 9d509f9c5db4e98f7b698cdfc4443505a4d2b331
It implements per-channel alpha_dropout. It also creates corresponding function classes and unifies the process of dropout and alpha_dropout.