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

How to convert Pytorch model checkpoint in .bin -> .npz ? #54

Open
shenw000 opened this issue Feb 18, 2023 · 0 comments
Open

How to convert Pytorch model checkpoint in .bin -> .npz ? #54

shenw000 opened this issue Feb 18, 2023 · 0 comments

Comments

@shenw000
Copy link

shenw000 commented Feb 18, 2023

Hello,

In "visualize_attention_map.ipynb", the trained model is loaded in the following line:
model.load_from(np.load("attention_data/Vit-B_16-224.npz"))

I used your train.py to finetune the Vit-B_16-224.npz with my custom data, which produced a Pytorch model checkpoint my-model.bin.
How do I perform the model.load_from for checkpoint my-model.bin? Do I need to convert the my-model.bin to a .npz format model? How can I convert it?

Thanks in advance!

@shenw000 shenw000 changed the title How to convert Pytorch model in .bin -> .npz ? How to convert Pytorch model checkpoint in .bin -> .npz ? Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant