Implement the triplet ranking hinge loss layer#603
Conversation
|
is the gradient correct? |
|
How did you derive the formula? |
|
the formula is |
|
In that paper, is the ranking model need to train three different convnet model (Q, P, N) at the same time? If it is, how to get the final feature after optimized? |
|
The feature triplets <Query feature, Similar sample feature, Dissimilar sample feature> should be generated by the same model. Otherwise, the distances between them are not comparable. |
4278286 to
c01f07a
Compare
|
Sorry , I am so new to caffe ,Can you give a simple example that how to use the triplet ranking hinge loss in the train.prototxt and val.prototxt; |
|
@kkcaros, please refer to the tutorial Siamese Network Training with Caffe. |
|
hi, I have read the code of the test cases for triple ranking loss and found that it checks the gradient of (*bottom)[0] ,but bottom[0] is the cpu diff of query data. In the backward function, you do not compute the diff of query data, so it may be always 0. Is there anything wrong? |
|
Closed as abandoned -- feel free to rescue if interested since a ranking loss could be useful. |
The triplet ranking hinge loss plays an important role in the deep ranking network of Google (#578). The major reference for the loss function is [1].
Compared with the Weighted Approximate Rank Pairwise (WARP) loss layer (#257, #126, #88), this loss is much simpler.
[1] Mohammad Norouzi, David Fleet, and Ruslan Salakhutdinov. Hamming Distance Metric Learning. NIPS 2013.