azshue / TPT

Test-time Prompt Tuning (TPT) for zero-shot generalization in vision-language models (NeurIPS 2022))
https://azshue.github.io/TPT/
MIT License
136 stars 16 forks source link

Batch-wise prompt tuning for TTA #13

Open e0jun opened 7 months ago

e0jun commented 7 months ago

Hello author Thank you for your excellent work.

I have a question about batch-wise prompt tuning for TTA.

For batch-wise prompt tuning for TTA, you add repeat operation to repeat the prompt batch size times as below. But, CoOp, the prompt tuning method for CLIP, does not require repeat operation for batch training. In my understanding, batch-wise prompt tuning for TTA also does not require repeat operation.

Could you give me an answer to this? I appreciate any help you can provide.

https://github.com/azshue/TPT/blob/63ecbace79694205d7884e63fdc3137a200f0b0e/clip/custom_clip.py#L105-L109