Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

timm integration #196

Merged
merged 14 commits into from
Apr 6, 2021
Merged

timm integration #196

merged 14 commits into from
Apr 6, 2021

Conversation

aniketmaurya
Copy link
Contributor

What does this PR do?

Fixes #172

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented Mar 27, 2021

Codecov Report

Merging #196 (9c4fc3e) into master (3b6a5de) will decrease coverage by 0.21%.
The diff coverage is 41.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #196      +/-   ##
==========================================
- Coverage   85.70%   85.49%   -0.22%     
==========================================
  Files          54       54              
  Lines        2483     2495      +12     
==========================================
+ Hits         2128     2133       +5     
- Misses        355      362       +7     
Flag Coverage Δ
unittests 85.49% <41.66%> (-0.22%) ⬇️

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

Impacted Files Coverage Δ
flash/vision/backbones.py 84.93% <36.36%> (-8.62%) ⬇️
flash/utils/imports.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 3b6a5de...9c4fc3e. Read the comment docs.

@Borda Borda added the enhancement New feature or request label Mar 28, 2021
requirements.txt Outdated Show resolved Hide resolved
flash/vision/backbones.py Outdated Show resolved Hide resolved
"""

if model_name in timm.list_models():
backbone = timm.create_model(model_name, pretrained=pretrained, num_classes=0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why num_classes = 0 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this method is suggested to create a model without a classification head in the timm docs. https://rwightman.github.io/pytorch-image-models/feature_extraction/#create-with-no-classifier-and-pooling

flash/vision/backbones.py Show resolved Hide resolved
flash/vision/backbones.py Show resolved Hide resolved
requirements/extras.txt Outdated Show resolved Hide resolved
@kaushikb11 kaushikb11 enabled auto-merge (squash) April 6, 2021 14:08
@kaushikb11 kaushikb11 merged commit 6e548a4 into Lightning-Universe:master Apr 6, 2021
Borda pushed a commit that referenced this pull request Apr 17, 2021
Co-authored-by: Kaushik B <[email protected]>
Co-authored-by: Kaushik Bokka <[email protected]>

(cherry picked from commit 6e548a4)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Pytorch-Image-Models to backbones
6 participants