info-nce-pytorch
info-nce-pytorch copied to clipboard
Question about input data
I have a quick question. My data is (data1, data2, label), where the label indicates if the pair of data points represent the same thing. 0 being not the same and 1 being the same. My objective is contrastive learning/loss. I take batches of the data, so I may have multiple positive pairs in each batch. What would be the optimal way to use this loss function with this data? Any help would be appreciated. Thanks.