FrancescoSaverioZuppichini / glasses

High-quality Neural Networks for Computer Vision 😎
https://francescosaveriozuppichini.github.io/glasses-webapp/
MIT License
436 stars 37 forks source link

from_pretrained allows to load weights when they matched #298

Closed FrancescoSaverioZuppichini closed 2 years ago

FrancescoSaverioZuppichini commented 2 years ago

Now we can do

AutoModel.from_pretrained("resnet18", n_classes=2)

And it will correctly load all the weights where they match without failing

codecov-commenter commented 2 years ago

Codecov Report

Merging #298 (ae54bbd) into develop (2ed34de) will increase coverage by 0.17%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #298      +/-   ##
===========================================
+ Coverage    95.69%   95.86%   +0.17%     
===========================================
  Files           86       86              
  Lines         3065     3073       +8     
===========================================
+ Hits          2933     2946      +13     
+ Misses         132      127       -5     
Impacted Files Coverage Δ
glasses/models/AutoModel.py 89.79% <100.00%> (+11.53%) :arrow_up:
test/test_auto.py 100.00% <100.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 2ed34de...ae54bbd. Read the comment docs.