-
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 RDN. #233
Add RDN. #233
Conversation
Codecov Report
@@ Coverage Diff @@
## master #233 +/- ##
==========================================
+ Coverage 79.93% 79.99% +0.05%
==========================================
Files 159 160 +1
Lines 7941 8002 +61
Branches 1177 1185 +8
==========================================
+ Hits 6348 6401 +53
- Misses 1449 1456 +7
- Partials 144 145 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
self.G0 = mid_channels | ||
self.G = growth_rate | ||
self.D = num_blocks | ||
self.C = num_layers |
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 names (G0
, G
or D
) are so ugly and confusing. Please rename it with regular terms.
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.
In general, the name of variables should not contain the capital words.
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.
Yeah, just use self.mid_channels = mid_channels
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.
G
, D
, C
e.t. are variables in the paper, I'll change them in code.
x (Tensor): Input tensor with shape (n, c, h, w). | ||
|
||
Returns: | ||
Tensor: Forward results, tensor with shape (n, c, h, w). |
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 don't think the shape does not change after concatenating
|
||
Args: | ||
in_channels (int): Channel number of inputs. | ||
out_channels (int): Channel number of outputs. |
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.
docstring does not match __init__
def __init__(self, in_channels, growth_rate, num_layers): | ||
super(RDB, self).__init__() | ||
self.layers = nn.Sequential(*[ | ||
DenseLayer(in_channels + growth_rate * i, growth_rate) |
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.
is growth_rate an int or a float ratio?
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.
It is int
, which is the channel number of dense layer output.
Paper: Residual Dense Network for Image Super-Resolution | ||
Adapted from: | ||
https://github.com/yulunzhang/RDN.git | ||
https://github.com/yjn870/RDN-pytorch |
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 licence info
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.
These GitHub projects don't have license files.
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, need to contact them
Default: 4. | ||
num_layer (int): Layer number in the Residual Dense Block. | ||
Default: 8. | ||
growth_rate(int): Channels growth in each layer of RDB. |
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.
rate
, a terminology that is often related to percentage, is not good to describe this number.
How about just growth
, or channel_growth
or growth_num
, etc.
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.
picked channel_growth
.
Mostly some comments on naming. Also need to rebase master :) |
Conflict with master now |
|
||
Paper: Residual Dense Network for Image Super-Resolution | ||
|
||
Adapted from '[email protected]:yjn870/RDN-pytorch.git' |
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.
use https://github.com/...
Linting fails |
* add RDN * Add docstring and test. * Tiny fix. * Tiny fix. * Add license. * Tiny Fix * Tiny Fix Co-authored-by: liyinshuo <[email protected]>
Residual Dense Network for Image Super-Resolution.