Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

A quick question about the definition of SimCLR #210

Open
HelloWorldLTY opened this issue Jan 17, 2023 · 2 comments
Open

A quick question about the definition of SimCLR #210

HelloWorldLTY opened this issue Jan 17, 2023 · 2 comments

Comments

@HelloWorldLTY
Copy link

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.

@chentingpc
Copy link
Contributor

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

@HelloWorldLTY
Copy link
Author

Got it, thanks a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants