How does the Tensorflow's TripletSemiHardLoss and TripletHardLoss and how to use with Siamese Network?
问题 As much as I know that Triplet Loss is a Loss Function which decrease the distance between anchor and positive but decrease between anchor and negative. Also, there is a margin added to it. So for EXAMPLE LEt us Suppose: a Siamese Network , which gives embeddings: anchor_output = [1,2,3,4,5...] # embedding given by the CNN model positive_output = [1,2,3,4,4...] negative_output= [53,43,33,23,13...] And I think I can get the triplet loss such as: (I think I have to make it as loss using Lambda