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

Support TorchVision's Multi-Weight API #3944

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

warner-benjamin
Copy link
Collaborator

This PR updates vision_learner and unet_learner to support TorchVision's multi-weight API using the new weights argument. The default of pretrained=True, weights=None will download the DEFAULT weights from TorchVision, which at the time of this PR are IMAGENET1K_V2.

To randomly initialize a model's weights, users will need to set both pretrained=False, weights=None.

If using pre TorchVision 0.13 or timm models setting weights will have no effect.

@warner-benjamin warner-benjamin requested a review from jph00 as a code owner August 17, 2023 22:26
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jph00
Copy link
Member

jph00 commented Aug 22, 2023

This is great! :D

@jph00 jph00 merged commit 9d8c730 into fastai:master Aug 22, 2023
@warner-benjamin warner-benjamin deleted the torchvision_weights branch October 16, 2023 16:50
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.

2 participants