ViT-pytorch icon indicating copy to clipboard operation
ViT-pytorch copied to clipboard

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

Open shenw000 opened this issue 1 year ago • 0 comments

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 avatar Feb 18 '23 05:02 shenw000