Share Your Experience: Take the 2024 Developer Survey

# Questions tagged [triplet-loss-function]

The tag has no usage guidance.

8 questions
Filter by
Sorted by
Tagged with
7k 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 ...
• 343
1k 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, ...
• 759
1 vote
412 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 ...
166 views

### Why is the time complexity of the Triplet Loss $O(N^3)$

The triplet loss function uses an anchor, positive, and negative examples. If $N$ are the number of examples in the training set with $C$ classes, then I think that the time complexity should be \$O(...
• 103
17 views

### What architecture is used for deep quadruplet network for person re-identification

I am trying to implement the paper Beyond triplet loss: a deep quadruplet network for person re-identification. In the paper, they provide a figure (attached below) containing the network architecture,...
197 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 ...
• 105