Skip to content
New issue

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

Adding details to NTXentLoss documentation #650

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

stompsjo
Copy link
Contributor

Hello! I use this repo so much I figured I ought to contribute where I can. I use NTXentLoss quite often and figured I could take a try at adding some documentation and address Issue #608.

I drew largely from @KevinMusgrave's comment to create an example of how embeddings are handled by the loss function. I realize much of the information I added is probably not specific enough to this loss function, so feel free to trim and cut to make it more concise.

(You can also scrap this PR entirely if it isn't what you had in mind for #608! I figured so many people are interested in temperature normalized cross-entropy loss that some additional documentation would benefit us all 😄)

@KevinMusgrave KevinMusgrave merged commit 9764110 into KevinMusgrave:master Jul 21, 2023
@KevinMusgrave
Copy link
Owner

Thanks @stompsjo this is great! I made some edits and merged the changes. You can see the updated docs: https://kevinmusgrave.github.io/pytorch-metric-learning/losses/#ntxentloss. The explanation is in the expandable section "How exactly is the NTXentLoss computed?"

@stompsjo stompsjo deleted the ntxentloss-docs branch July 21, 2023 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants