We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello! First of all, thanks for this awesome library.
Is there a way to pass to a loss function a matrix of 0 and 1 (or False and True) of every possible pair instead of passing the class labels?
I'm asking this to manage the case where a sample belongs to multiple classes.
The text was updated successfully, but these errors were encountered:
For contrastive losses (ContrastiveLoss, NTXentLoss etc.) you can omit the labels and pass in indices_tuple:
indices_tuple
loss_fn = ContrastiveLoss() loss = loss_fn(embeddings, indices_tuple=indices_tuple)
Here's an example of how you can specify positive and negative pairs using indices_tuple: #435 (comment)
The discussion in the link is about the output of a miner, but you don't have to use a miner. You can manually create the indices_tuple yourself.
Sorry, something went wrong.
No branches or pull requests
Hello! First of all, thanks for this awesome library.
Is there a way to pass to a loss function a matrix of 0 and 1 (or False and True) of every possible pair instead of passing the class labels?
I'm asking this to manage the case where a sample belongs to multiple classes.
The text was updated successfully, but these errors were encountered: