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
[Enhance] Add stochastic depth decay rule in resnet #1363
[Enhance] Add stochastic depth decay rule in resnet #1363
Conversation
Codecov ReportBase: 0.02% // Head: 86.79% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #1363 +/- ##
============================================
+ Coverage 0.02% 86.79% +86.77%
============================================
Files 121 169 +48
Lines 8217 13969 +5752
Branches 1368 2221 +853
============================================
+ Hits 2 12125 +12123
+ Misses 8215 1461 -6754
- Partials 0 383 +383
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
mmcls/models/backbones/res2net.py
Outdated
drop_path_rate = np.array([drop_path_rate]) | ||
drop_path_rate = drop_path_rate.repeat(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.
I think [drop_path_rate] * num_blocks
is enough, we don't need to import numpy and use numpy array 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.
forgot to update
* add stochastic depth decay rule to drop path rate * add default value * update * pass ut * update * pass ut * remove np
* [Enhance] Add stochastic depth decay rule in resnet. (#1363) * add stochastic depth decay rule to drop path rate * add default value * update * pass ut * update * pass ut * remove np * rebase * update ToPIL and ToNumpy * rebase * rebase * rebase * rebase * add readme * fix review suggestions * rebase * fix conflicts * fix conflicts * fix lint * remove comments * remove useless code * update docstring * update doc API * update doc --------- Co-authored-by: Yixiao Fang <36138628+fangyixiao18@users.noreply.github.com>
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Please describe the motivation of this PR and the goal you want to achieve through this PR.
Modification
update resnet according to timm
code link: https://github.com/rwightman/pytorch-image-models/blob/main/timm/models/resnet.py#L600
BC-breaking (Optional)
Does the modification introduce changes that break the backward compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here and update the documentation.
Checklist
Before PR:
After PR: