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

Pre-computing triplets in TripletDataset #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mir-am
Copy link
Member

@mir-am mir-am commented May 20, 2022

Before this PR, we had to compute triplets on the fly to obtain a training sample, slowing down training and making the GPU wait for data.
This PR makes an improvement to TripletDataset by pre-computing triplets before training the model and giving up to 6 times faster training speed. This way, obtaining a training sample to create batches is almost instant. However, with this improvement, each anchor has only one corresponding positive and negative example in every epoch.

@mir-am mir-am added the enhancement New feature or request label May 20, 2022
@mir-am mir-am self-assigned this May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant