You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we only upload checkpoint weights for the full SSL models. But those can be a bit hard to work with as you have to modify fields in the state dict if you only want to load the backbone. We should upload the weights for the backbone only to make them more easily usable.
Tasks
Save backbone state dict after pretraining (here). This can be done with torch.save(model.backbone.state_dict(), path). Path should be a path in the same directory as the full checkpoint. Do the same for vit benchmarks.
Save backbone state dict for existing pretrained models and upload them to S3. This can be done with
checkpoint = torch.hub.load_state_dict_from_url(url, map_location="cpu")
# Remove 'backbone.' prefix from keys in state_dict
backbone_state_dict = {
k.replace("backbone.", ""): v
for k, v in checkpoint["state_dict"].items()
if k.startswith("backbone.")
}
torch.save(backbone_state_dict, path)
Right now we only upload checkpoint weights for the full SSL models. But those can be a bit hard to work with as you have to modify fields in the state dict if you only want to load the backbone. We should upload the weights for the backbone only to make them more easily usable.
Tasks
torch.save(model.backbone.state_dict(), path)
. Path should be a path in the same directory as the full checkpoint. Do the same for vit benchmarks.The text was updated successfully, but these errors were encountered: