Sara-Ahmed / SiT

Self-supervised vIsion Transformer (SiT)
324 stars 49 forks source link

ContrastiveLoss problem #26

Closed zhangjiwei-japan closed 1 year ago

zhangjiwei-japan commented 2 years ago

I think in the code “nominator = torch.exp(positives / self.temperature) # 2bs denominator = self.negatives_mask torch.exp(similarity_matrix / self.temperature),” denominator contains nominator and the formula (k!=i) in the paper is somewhat different,thank you.

Sara-Ahmed commented 1 year ago

Sorry for the late response. The loss function is updated in the main file and the Arxiv paper will be updated soon.