Skip to content

Pre-computing triplets in TripletDataset#12

Open
mir-am wants to merge 1 commit intomainfrom
data_loader_optimize
Open

Pre-computing triplets in TripletDataset#12
mir-am wants to merge 1 commit intomainfrom
data_loader_optimize

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.

1 participant