x-cls / superclass

[NeurIPS 2024] Classification Done Right for Vision-Language Pre-Training
Apache License 2.0
160 stars 6 forks source link

zeroshot OR eval on in1k #4

Closed zhiwenhou1227 closed 1 week ago

zhiwenhou1227 commented 1 week ago

请问有在in1k上zero-shot的代码吗,在.yaml文件里设置了如下参数: zeroshot_steps: 1200000 val_steps: 1200000 zeroshot_frequency: 1 会有如下报错AttributeError: 'Classifier' object has no attribute 'encode_text',请教下该如何适配呢

zhiwenhou1227 commented 1 week ago

知道问题在哪里了,在训superclass的时候加入了zero shot导致的错误,如果想在in1k上进行zero shot,是不是必须得在训练下LiT部分?

speedinghzl commented 1 week ago

是的。需要LiT后再做zero-shot。