Definition

Triplet loss is a Loss Function where a reference input (anchor) is compared to a matching input (positive) and a non-matching input (negative). The distance from the anchor to the positive is minimized, and the distance from the anchor to the negative input is maximized.

where is a margin between positive and negative pairs