-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add TDAN backbone #316
Add TDAN backbone #316
Conversation
Codecov Report
@@ Coverage Diff @@
## master #316 +/- ##
==========================================
- Coverage 80.30% 80.05% -0.25%
==========================================
Files 177 178 +1
Lines 9280 9332 +52
Branches 1352 1357 +5
==========================================
+ Hits 7452 7471 +19
- Misses 1640 1673 +33
Partials 188 188
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
generate the offsets. | ||
|
||
Args: | ||
in_channels (int): Same as nn.Conv2d. |
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 refactor docstring of args or copy explain of these args from nn.Conv2d
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.
Okay~
False. | ||
""" | ||
|
||
def __init__(self, *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.
How about the same as docstring rather than use *args
and **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.
This class is similar to DeformConv2dPack
. Therefore I think it is better to follow the definition in DeformConv2dPack
.
Reference: https://mmcv.readthedocs.io/en/latest/_modules/mmcv/ops/deform_conv.html#DeformConv2dPack
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.
OK
|
||
self.conv_offset = nn.Conv2d( | ||
self.in_channels, | ||
self.deform_groups * 2 * self.kernel_size[0] * self.kernel_size[1], |
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.
deform_groups
is not in docstring
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.
Okay~
super().__init__() | ||
|
||
self.feat_extract = nn.Sequential( | ||
ConvModule(3, 64, 3, padding=1), |
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.
How about declaring args such as in_channels, out_channels, mid_channels=64
.
|
||
self.reconstruct = nn.Sequential( | ||
ConvModule(3 * 5, 64, 3, padding=1), | ||
make_layer(ResidualBlockNoBN, 10, mid_channels=64), |
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.
And num_blocks
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.
such as num_blocks=10
lrs (Tensor): Input LR sequence with shape (n, t, c, h, w). | ||
|
||
Returns: | ||
Tensor: Output HR image with shape (n, c, 4h, 4w). |
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.
The returns in docstring are different from those in code.
Please do not merge for the moment. |
Okay now. |
* Add TDAN architecture * Modify docstring * Fix bug in unittest * Update backbone * Minor update * Change TDANNet arguments
TDAN: Temporally-Deformable Alignment Network for Video Super-Resolution, CVPR, 2020