I am trying to load just the downloaded model checkpoint.pth to be used as a PyTorch module in another model. I found it difficult to extract the minimum amount of code necessary to load checkpoint.pth as a PyTorch module.
Specifically, I cannot just run
python main_sim.py --dataset wikiart -a vit_large --pt_style csd --feattype normal --world-size 1
--dist-url tcp://localhost:6001 -b 128 -j 8 --embed_dir ./embeddings --data-dir <path to WikiArt dataset>
--model_path <path to CSD weights>
because I need to use the module as part of a larger model, not on its own.
Further, there are two discrepancies:
- It is claimed that the
checkpoint.pth available for download is a ViT-L, but it has only 304M parameters, while ViT-L has 428M parameters.
- The paper says you have finetuned both
ViT-B and ViT-L, but there is no ViT-B checkpoint available for download.
I am trying to load just the downloaded model
checkpoint.pthto be used as a PyTorch module in another model. I found it difficult to extract the minimum amount of code necessary to loadcheckpoint.pthas a PyTorch module.Specifically, I cannot just run
because I need to use the module as part of a larger model, not on its own.
Further, there are two discrepancies:
checkpoint.pthavailable for download is aViT-L, but it has only 304M parameters, whileViT-Lhas 428M parameters.ViT-BandViT-L, but there is noViT-Bcheckpoint available for download.