Questions tagged [triplet-loss-function]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
35 views

What is the difference between the triplet loss and the contrastive loss?

What is the difference between the triplet loss and the contrastive loss? They look same to me. I don't understand the nuances between the two. I have the following queries: When to use what? What ...
user avatar
0 votes
0 answers
17 views

Why does triplet loss allow to learn a ranking whereas contrastive loss only allows to learn similarity?

I am looking at this lecture, which states (link to exact time): What the triplet loss allows us in contrast to the contrastive loss is that we can learn a ranking. So it's not only about similarity, ...
user avatar
  • 669
0 votes
0 answers
25 views

How to use a Siamese network at test time?

I am trying to understand Siamese networks, and understand how to train them. Once I have a trained network, I want to know if a new image is close or far to other images in the train set, and fail to ...
user avatar
  • 669
0 votes
1 answer
39 views

Does this modified version of the triplet loss function introduced with SBERT that uses the cosine similarity make sense?

I am working on a modified version of the triplet loss function introduced with SBERT, where instead of the Euclidean distance we use the cosine similarity. The formula to minimize is ...
user avatar
  • 103
1 vote
2 answers
91 views

Triplet Loss- Three forward pass and one backward pass(Propagation)

I am trying to build a CNN model based on the concepts of Contrastive Learning. In specific based on Triplet loss. I have 5 different class labels and I create triplets such that in a triplet, two ...
user avatar
0 votes
1 answer
221 views

How to retrain a Facenet model with the triplet loss function?

I want to calculate the similarity or distance of two faces. I'm using Python. I have read and done what this tutorial says. However, the result is not good (the similarity of same faces and ...
user avatar
  • 101