Max margin contrastive loss (Hadsell et al. 2006) takes a pair of embedding vectors z_i and z_j as inputs. It essentially equates the Euclidean distance* between them if they have the same label (y_i=y_j) and is otherwise equivalent to hinge loss, It has a margin parameter m > 0 to impose a lower bound on the distance : label 이 같을 때, 다를 때 나눠서 각각에 거리를 loss 에 반영.