def rankingLoss(self, input_example, input_positive, input_negative):
        """Return the mean of the triplet ranking loss"""

        positive_distances = sqr_euclidean_dist(input_example, input_positive)
        negative_distances = sqr_euclidean_dist(input_example, input_negative)
        loss = K.mean(K.maximum(0., self.confidence_margin - (negative_distances - positive_distances)))
        return loss
Return the mean of the triplet ranking loss
adbench/baseline/REPEN/model.py