According to the paper, the CLIP-NCE loss is like

there should be two positive terms in the denominator, while in the code
|
return self.InfoNCE(query.repeat(2,1), torch.cat([pos1_direction,pos2_direction], 0), neg_direction) |
if I understand correctly, there will be only one positive term in the denominator (as the two positive is separately considered as different batch), which seems inconsistent.
According to the paper, the CLIP-NCE loss is like

there should be two positive terms in the denominator, while in the code
CF-CLIP/criteria/nce_loss.py
Line 99 in 58c0413
if I understand correctly, there will be only one positive term in the denominator (as the two positive is separately considered as different batch), which seems inconsistent.