Skip to content
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

fix basemodule #1018

Merged
merged 2 commits into from
May 13, 2021
Merged

fix basemodule #1018

merged 2 commits into from
May 13, 2021

Conversation

jshilong
Copy link
Collaborator

Motivation

In the original implementation, when init a module with the pre-train model,

for m in self.children():

if there are children who have init_weights, the pretrain model would be overridden which is not reasonable.

Modification

Retune when find it is loading a pre-train model.

BC-breaking (Optional)

None

@jshilong jshilong requested a review from MeowZheng May 11, 2021 14:51
Copy link
Collaborator

@MeowZheng MeowZheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for you fixing the bug. It looks good to me.

@codecov
Copy link

codecov bot commented May 11, 2021

Codecov Report

Merging #1018 (97c5ccc) into master (c77e95a) will increase coverage by 0.14%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1018      +/-   ##
==========================================
+ Coverage   64.70%   64.84%   +0.14%     
==========================================
  Files         152      154       +2     
  Lines        9841     9886      +45     
  Branches     1791     1800       +9     
==========================================
+ Hits         6368     6411      +43     
- Misses       3144     3145       +1     
- Partials      329      330       +1     
Flag Coverage Δ
unittests 64.84% <50.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmcv/runner/base_module.py 75.67% <50.00%> (-3.12%) ⬇️
mmcv/ops/__init__.py 100.00% <0.00%> (ø)
mmcv/ops/pixel_group.py 100.00% <0.00%> (ø)
mmcv/ops/contour_expand.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c77e95a...97c5ccc. Read the comment docs.

@jshilong jshilong requested a review from ZwwWayne May 13, 2021 04:35
@ZwwWayne ZwwWayne merged commit da07114 into open-mmlab:master May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants