The loss function chosen is the Contrastive Loss [1]}, [2]}.
Contrastive Loss takes pairs of samples and maps them into a space where intra-class samples reside in neighbor areas and inter-class samples are far away.
