-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Moving common layers to ops #4504
Conversation
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.
Highlighting the interesting parts of the implementation
Can we move stochastic depth from |
@oke-aditya thanks for the comment. Note that the StochasticDepth layer lives in its own module at The historical convention for where to include things seems to be that layers with functional and class components end up on their own modules while those that are simple and use standard building convolutional blocks end up in |
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.
LGTM, thanks!
Summary: * Moving _make_divisible to utils. * Replace the old ConvBNReLU and ConvBNActivation layers * Fix minor bug. * Moving SE layer to ops. * Adding deprecation warnings on old layers. * Apply changes to regnets. Reviewed By: prabhat00155, NicolasHug Differential Revision: D31309549 fbshipit-source-id: 2780783ddfeb58974829607ac90f122b915f7366
* Moving _make_divisible to utils. * Replace the old ConvBNReLU and ConvBNActivation layers * Fix minor bug. * Moving SE layer to ops. * Adding deprecation warnings on old layers. * Apply changes to regnets.
* Moving _make_divisible to utils. * Replace the old ConvBNReLU and ConvBNActivation layers * Fix minor bug. * Moving SE layer to ops. * Adding deprecation warnings on old layers. * Apply changes to regnets.
Partially resolves #4333
In this PR:
_make_divisible()
from MobileNetV2 tomodels._utils
.ConvBNReLU
andConvBNActivation
classes in favour of a newConvNormActivation
added inops.misc
.SqueezeExcitation
toops.misc
and slightly modified the class to use only nn.Modules instead of functional.