locuslab / FLYP

Code for Finetune like you pretrain: Improved finetuning of zero-shot vision models
MIT License
90 stars 14 forks source link

How to load created checkpoints? #16

Closed ugsup closed 1 year ago

ugsup commented 1 year ago

How can I load the checkpoints that were saved during the training? I can't open the checkpoint.pt file with torch.load.

wendioooo commented 9 months ago

How did you load it? I have similar problem.

ugsup commented 9 months ago

The torch_load() and torch_save() methods(https://github.com/locuslab/FLYP/blob/main/src/models/utils.py) here use the pickle library, but for some unknown reason this does not work. So instead of pickle.dumb() and pickle.load() I simply used the load and save methods of pytorch.