siamese-triplet icon indicating copy to clipboard operation
siamese-triplet copied to clipboard

Online Triplet Loss calculation

Open ukunliu opened this issue 1 year ago • 0 comments

Hi,

I noticed in the triplet selection process, the distance matrix is calculated, which is square L2 norm between embedding vectors. Based on the distance matrix, the triplets are selected and used to calculate the OnlineTripletLoss (margin loss).

While during the calculation of margin loss, it seems the L2 norm is calculated again as we did during triplet selection and but averaged. So I guess it is possible to pass the loss values during triplet selection procedure to the OnlineTripletLoss directly?

ukunliu avatar Oct 25 '23 13:10 ukunliu