Proto-CLIP icon indicating copy to clipboard operation
Proto-CLIP copied to clipboard

no such file

Open caoziyang1997 opened this issue 1 year ago • 1 comments

when I run:

CUDA_VISIBLE_DEVICES=1 python main.py
--config configs/fewsol_198.yml
--dataset fewsol --logs tb_logs
--alpha 0.2
--beta 12.0
--adapter 'fc'
--train_vis_memory_only

then the error encountered:

Traceback (most recent call last): File "/home/syf/ziyang/Proto-CLIP/main.py", line 393, in run_proto_clip embeddings_v = torch.load(best_model_path_v) File "/home/syf/anaconda3/envs/proto-clip/lib/python3.10/site-packages/torch/serialization.py", line 791, in load with _open_file_like(f, 'rb') as opened_file: File "/home/syf/anaconda3/envs/proto-clip/lib/python3.10/site-packages/torch/serialization.py", line 271, in _open_file_like return _open_file(name_or_buffer, mode) File "/home/syf/anaconda3/envs/proto-clip/lib/python3.10/site-packages/torch/serialization.py", line 252, in init super().init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: './caches/fewsol/models/ViT_L_14/K-16/alpha-beta/0.2-12.0/best_lr_0.0001_aug_10_epochs_2000_v.pt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/syf/ziyang/Proto-CLIP/main.py", line 552, in main() File "/home/syf/ziyang/Proto-CLIP/main.py", line 547, in main run_proto_clip(cfg, visual_memory_keys, visual_memory_values, val_features, val_labels, File "/home/syf/ziyang/Proto-CLIP/main.py", line 397, in run_proto_clip raise FileNotFoundError( FileNotFoundError: File does not exist: ./caches/fewsol/models/ViT_L_14/K-16/alpha-beta/0.2-12.0/best_lr_0.0001_aug_10_epochs_2000_v.pt and ./caches/fewsol/models/ViT_L_14/K-16/alpha-beta/0.2-12.0/best_lr_0.0001_aug_10_epochs_2000_t.pt

caoziyang1997 avatar Apr 28 '24 02:04 caoziyang1997

Hi @caoziyang1997,

It seems that you are trying to train a new proto-clip model. Please check if models are saved in ./caches/fewsol/models/ after training, as this error occurs when the best-trained model is used for testing.

jishnujayakumar avatar Jun 15 '24 22:06 jishnujayakumar

can you give me imagenet link? I do not how to download it. Thank you!

caoziyang1997 avatar Aug 20 '24 07:08 caoziyang1997

The issue has been addressed here (#16). Therefore, I will be closing this issue.

jishnujayakumar avatar Aug 22 '24 01:08 jishnujayakumar