-
Notifications
You must be signed in to change notification settings - Fork 1.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
[Enhancement] Add build_func for UPSAMPLE_LAYERS #1272
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1272 +/- ##
==========================================
+ Coverage 68.42% 68.82% +0.40%
==========================================
Files 160 161 +1
Lines 10610 10747 +137
Branches 1938 1972 +34
==========================================
+ Hits 7260 7397 +137
+ Misses 2975 2962 -13
- Partials 375 388 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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
'deprecated. Please use ' | ||
'``UPSAMPLE_LAYERS.build(cfg, *args, **kwargs)`` instead.')) | ||
|
||
return build_upsample_layer_from_cfg(cfg, UPSAMPLE_LAYERS, *args, **kwargs) |
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.
Should use UPSAMPLE_LAYERS.buil() here?
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.
Will lead to recursive import.
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.
Then please leave a comment above this line of code.
|
||
def build_upsample_layer_from_cfg(cfg, registry, *args, **kwargs): | ||
"""Build upsample layer. | ||
|
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.
Add docstring to indicates what is the difference between build_upsample_layer_from_cfg and build_from_cfg
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.
Since the interfaces of all UPSAMPLE_LAYERs modules are different.
I have added usage and deprecate information.
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.
I just wrap build_upsample_layer
as a build_func (build_upsample_layer_from_cfg
) and build_upsample_layer
can be deprecated in the future.
|
Motivation
Add
build_func
forUPSAMPLE_LAYERS
Modification
UPSAMPLE_LAYERS
BC-breaking (Optional)
Does the modification introduce changes that break the backward-compatibility of the downstream repos?
Not sure.
Use cases