simclr icon indicating copy to clipboard operation
simclr copied to clipboard

A quick question about the definition of SimCLR

Open HelloWorldLTY opened this issue 2 years ago • 2 comments

Hi, I intend to use InfoNCE loss in a graph, but I am confused about the definition of SimCLR. Based on the random sample approach mentioned in this paper, is it reasonable to choose only one pair in the dataset as positive pair while the rest of pairs are treated as negative pairs? What if all the pairs we sampled are actually positive or negative pairs? Thanks a lot.

HelloWorldLTY avatar Jan 17 '23 14:01 HelloWorldLTY

positive pairs are generated from augmentations of the same image, and negative pairs are other (augmented) images in the mini-batch, so you're guaranteed with both positive and negative pairs

chentingpc avatar Jan 18 '23 00:01 chentingpc

Got it, thanks a lot!

HelloWorldLTY avatar Jan 30 '23 03:01 HelloWorldLTY