Open AlansoG opened 2 years ago
Cosine similarity can just produce scores between -1 and 1. Hence, using the right margin is quite important.
Also note that MultipleNegativesRankingLoss works usually a lot better than triplet loss and also allows to take tripets.
@nreimers how do I interpret this Triplet Loss ,could you please help. Also If i want to view my loss progress during training,how I can do ?
epoch | steps | accuracy_cosinus | accuracy_manhattan | accuracy_euclidean -- | -- | -- | -- | -- 0.72 | 0.72 | 0.70 -- | -- | --
Hi , I trained sbert with triplet loss with default distance_metric --> Euclidian distance got descent embeddings and cosine score between relevant/irrelevant sentences. But when i tried with TripletDistanceMetric.COSINE cosine score between any 2 sentances are around 0.9999 even through they are relevent or not. I just changed distance_metric in training script , everything is similar. Could you please help me for understanding why I am getting 0.999 cosine score for all sentance pairs ?