muzairkhattak / multimodal-prompt-learning

[CVPR 2023] Official repository of paper titled "MaPLe: Multi-modal Prompt Learning".
https://muzairkhattak.github.io/multimodal-prompt-learning/
MIT License
578 stars 42 forks source link

Some errors when I run the code #36

Closed bf-yang closed 10 months ago

bf-yang commented 10 months ago

Thanks for your great job.

When I run the following code: bash scripts/vpt/base2new_train_vpt.sh oxford_flowers 1 bash scripts/maple/base2new_train_maple.sh oxford_flowers 1 They both report errors. But when I run the code: bash scripts/coop/main.sh oxford_flowers vit_b16 middle 16 1 False, it works.

It seems that I can only successfully run zeroshotCLIP and CoOp codes. But for VPT and MaPLe codes, it reports an error.

Specifically, when I run bash scripts/vpt/base2new_train_vpt.sh oxford_flowers 1, it reports:

image

when I run bash scripts/maple/base2new_train_maple.sh oxford_flowers 1, it reports: image

How can I successfully run these two .sh files?

muzairkhattak commented 10 months ago

Hi @bf-yang,

Thank you for showing interest in MaPLe!

I think the error caused is due to the use of multiple GPUs. You may need to use only one GPU per training.

So, you can mention the usage of one GPU while running the bash scripts (by using CUDA_VISIBLE_DEVICES=0)

Please let me know if this resolves your issue.

Thank you and kind regards!

bf-yang commented 10 months ago

I add CUDA_VISIBLE_DEVICES=0 into the script file, like: image But it still reports the same error: image

muzairkhattak commented 10 months ago

Can you try using this variable like the following:

CUDA_VISIBLE_DEVICES=0 bash scripts/vpt/base2new_train_vpt.sh oxford_flowers 1

bf-yang commented 10 months ago

It helps me a lot. Thanks very much for your excellent work and your help!