Replies: 1 comment 2 replies
-
@sachinruk in the latest timm version you can do this rn50_cfg = timm.models.get_pretrained_cfg('resnet50')
rn50_cfg['url'] = 'https://mycustom/checkpoint.pth'
model = timm.create_model('resnet50', pretrained_cfg=rn50_cfg, pretrained=True) as per #1323, you can also load local checkpoints as if they are pretrained (change the head, use features_only, etc) rn50_cfg = timm.models.get_pretrained_cfg('resnet50')
rn50_cfg.pop('url')
rn50_cfg['file'] = '/blah/checkpoint.pth'
model = timm.create_model('resnet50', pretrained_cfg=rn50_cfg, pretrained=True, num_classes=10) I'll working a way to make these two options even easier by detecting url or file paths as an overload argument, but for now must be done by modifing and passing whoe pretrained_cfg in... |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to change the download location of a model when using
create_model
. If I usecheckpoint_path
it expects the model to already be there.Beta Was this translation helpful? Give feedback.
All reactions