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?
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?