navervision / lincir

Official Pytorch implementation of LinCIR: Language-only Training of Zero-shot Composed Image Retrieval (CVPR 2024)
Other
100 stars 5 forks source link

Why training and validation use the same function? (encode_with_pseudo_tokens_HF) #13

Closed mcx-mcx closed 7 months ago

mcx-mcx commented 7 months ago

In the Line 239 of train_phi.py and Line 162 of validate.py, i.e.,https://github.com/navervision/lincir/blob/6ffbdebb665878285afcb8f5263a1f8a44937ad4/train_phi.py#L239 and https://github.com/navervision/lincir/blob/6ffbdebb665878285afcb8f5263a1f8a44937ad4/validate.py#L162, Why these two use the same function? The former's replaced_tokens contain not only one $, but the latter's tokenized_input_captions contain only one $. The meaning of the two usages is different, and the former assigns the same value to each $, which seems problematic.

SanghyukChun commented 7 months ago

Please check the previous comments. This is not a bug. Please check our paper as well https://github.com/navervision/lincir/issues/12#issuecomment-1978102388