Skip to main content
3 votes

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

These are not the same loss, but are often confused because many people use the term contrastive to refer to the triplet loss. Contrastive Loss is defined in the paper "Dimensionality Reduction ...
Dr. Snoopy's user avatar
  • 1,355
2 votes

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

Welcome to AI SE! I think they use an AlexNet architecture for the following 2 reasons. 1: The AlexNet architecture matches exactly with the architecture shown in Figure 3 (5 conv layers and 3 fc ...
Robin van Hoorn's user avatar
2 votes
Accepted

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

For each anchor data point $x_i^a$ in class $j$, the intra-distance should be computed $g_j$ times, where $g_j$ is the sample size of that class and the inter-distance should be computed as $N$ times, ...
dd123's user avatar
  • 36
1 vote

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

In the first you compare A and B. So if A is closer to B and y= 1 then it's better, that's it. In the second, you compare A to P and A to N simultaneously. So if A is closer to P it's good, but it's ...
Skobo Do's user avatar
1 vote
Accepted

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

A Loss function is just a function with a minimum. In machine learning though, we also require the loss function to be differentiable, otherwise no backpropagation and hence no weight updating. ...
Edoardo Guerriero's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible