Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [triplet-loss-function]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
9 votes
1 answer

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 ...
Exploring's user avatar
  • 343
2 votes
2 answers

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, ...
Gulzar's user avatar
  • 759
1 vote
2 answers

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 ...
Raj Rajeshwari Prasad's user avatar
0 votes
1 answer

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(...
wd violet's user avatar
  • 103
0 votes
1 answer

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,...
Varghese Kuruvilla's user avatar
0 votes
1 answer

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 ...
randomal's user avatar
  • 105
0 votes
0 answers

Sampling triplet sets in the field of few-shot learning

I have recently been exposed to the concept of K-way N-shot classification. As far as I realize few-shot learning involves meta training and meta testing sets for training and testing our model, ...
Miss M's user avatar
  • 1
-1 votes
1 answer

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 ...
behrad's user avatar
  • 99