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: Fixed PyTorch param loading #425

Merged
merged 4 commits into from
Aug 23, 2021
Merged

fix: Fixed PyTorch param loading #425

merged 4 commits into from
Aug 23, 2021

Conversation

fg-mindee
Copy link
Contributor

Following up on #422, this PR switches back to the common parameter loading mechanism.

Previously, some pytorch models' factory functions were throwing errors when pretrained=True. With this PR, it throws a warning and proceeds with param initialization when no checkpoint is available.

Any feedback is welcome!

@fg-mindee fg-mindee added critical High priority module: models Related to doctr.models framework: pytorch Related to PyTorch backend labels Aug 23, 2021
@fg-mindee fg-mindee added this to the 0.3.1 milestone Aug 23, 2021
@fg-mindee fg-mindee self-assigned this Aug 23, 2021
charlesmindee
charlesmindee previously approved these changes Aug 23, 2021
Copy link
Collaborator

@charlesmindee charlesmindee left a comment

Choose a reason for hiding this comment

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

Thanks

@codecov
Copy link

codecov bot commented Aug 23, 2021

Codecov Report

Merging #425 (4923d1d) into main (94e984c) will increase coverage by 0.00%.
The diff coverage is 42.85%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #425   +/-   ##
=======================================
  Coverage   95.80%   95.81%           
=======================================
  Files          96       96           
  Lines        3937     3942    +5     
=======================================
+ Hits         3772     3777    +5     
  Misses        165      165           
Flag Coverage Δ
unittests 95.81% <42.85%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
doctr/models/recognition/crnn/pytorch.py 98.03% <33.33%> (+0.01%) ⬆️
...s/detection/differentiable_binarization/pytorch.py 96.36% <50.00%> (+0.03%) ⬆️
doctr/models/detection/linknet/pytorch.py 96.93% <50.00%> (+0.03%) ⬆️
doctr/models/backbones/mobilenet/tensorflow.py 97.50% <0.00%> (+0.06%) ⬆️

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 94e984c...4923d1d. Read the comment docs.

Copy link
Collaborator

@charlesmindee charlesmindee left a comment

Choose a reason for hiding this comment

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

Thanks!

@fg-mindee fg-mindee merged commit 29e2588 into main Aug 23, 2021
@fg-mindee fg-mindee deleted the pretrained-pt branch August 23, 2021 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical High priority framework: pytorch Related to PyTorch backend module: models Related to doctr.models
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants