muzairkhattak/multimodal-prompt-learning

Question about reproduce_maple.sh

HaoliangZhou opened this issue · 2 comments

Hello! I have a question, please. When run the evaluation script scripts/maple/reproduce_maple.sh, what path shoud be right, "MaPLe/output/base2new/train_base/caltech101/shots_16/MaPLe/vit_b16_c2_ep5_batch4_2ctx/seed1/MultiModalPromptLearner" or "MaPLe/output/base2new/train_base/caltech101/" or both are wrong?

because when i use the command "CUDA_VISIBLE_DEVICES=6 bash scripts/maple/reproduce_maple.sh oxford_flower 1 MaPLe/output/base2new/train_base/oxford_flower/shots_16/MaPLe/vit_b16_c2_ep5_batch4_2ctx/seed1/MultiModalPromptLearner"
there will report such errors :

Traceback (most recent call last):
File "train.py", line 245, in
main(args)
File "train.py", line 183, in main
trainer.load_model(args.model_dir, epoch=args.load_epoch)
File "MaPLe/trainers/maple.py", line 318, in load_model
raise FileNotFoundError('Model not found at "{}"'.format(model_path))
FileNotFoundError: Model not found at "MaPLe/output/base2new/train_base/oxford_flowers/shots_16/MaPLe/vit_b16_c2_ep5_batch4_2ctx/seed1/MultiModalPromptLearner/base/seed1/MultiModalPromptLearner/model.pth.tar-5"

Hi @HaoliangZhou,

Thank you for showing interest in MaPLe!

Regarding your query, please note that you only need to give the path to the folder where you have downloaded the pretrained weights.

For example, if you have downloaded imagenet weight folder imagenet, then you should provide path which points to that imagenetfolder.

You do not need to provide the extra path such as MaPLe/output/base2new/train_base/oxford_flower/shots_16/MaPLe/vit_b16_c2_ep5_batch4_2ctx/seed1/MultiModalPromptLearner as our code will append this automatically.

I hope this will resolve you issue.

Kind regards,
Muhammad Uzair

Thank you very much!