Skip to content

Question about SelfSupervisedLoss #632

Discussion options

You must be logged in to vote

It assumes that:

  • ref_emb[i] is an augmented version of embeddings[i].
  • ref_emb[i] is the only augmented version of embeddings[i] in the batch.

Here's how it's implemented:

def forward(self, embeddings, ref_emb):
"""
embeddings: representations of the original set of inputs
ref_emb: representations of an augmentation of the inputs.
*args: variable length argument list, where each argument
is an additional representation of an augmented version of the input.
i.e. ref_emb2, ref_emb3, ...
"""
labels = torch.arange(embeddings.shape

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by andreafuschino
Comment options

You must be logged in to vote
1 reply
@KevinMusgrave
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants