I'm trying to learn how to use a TripletLoss in a Siamese Network. My goal is to build a classification siamese model, so I suppose I need both a Triplet Loss to minimize distances and a Cross Entropy Loss for classification.
I managed to build a Triplet Siamese Network in Pytorch that takes the embeddings of the three (anchor, positive and negative), concatenates them and puts the output in another Sequential model which gives the prediction as output with the Cross Entropy Loss. My problem is: where should I put my Triplet Loss?
Thank you in advance.