def _compute_total_loss(self, labels, logits):
    'Summation of the categorical hinge loss for labels and logits.'
    error = 0.0
    for (label, logit) in zip(labels, logits):
        positive = (label * logit)
        negative = ((1 - label) * logit)
        error += np.maximum(0.0, ((negative - positive) + 1.0))
    return error
Summation of the categorical hinge loss for labels and logits.
def _compute_total_loss(self, labels, logits):
    
    error = 0.0
    for (label, logit) in zip(labels, logits):
        positive = (label * logit)
        negative = ((1 - label) * logit)
        error += np.maximum(0.0, ((negative - positive) + 1.0))
    return error