import tensorflow as tf

        corrects = tf.equal(preds, classes)
        return (probs, corrects)

    def _compute_loss(self, logits, aux_logits_list, classes, **knobs):
        reg_decay = knobs['reg_decay']
        aux_loss_mul = knobs['aux_loss_mul'] # Multiplier for auxiliary loss

        # Compute sparse softmax cross entropy loss from logits & labels
        log_probs = tf.nn.sparse_softmax_cross_entropy_with_logits(logits=logits, labels=classes)
        loss = tf.reduce_mean(log_probs)
        self._mark_for_monitoring('loss', loss)

        # Add regularization loss
        reg_losses = tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)
        reg_loss = reg_decay * tf.add_n(reg_losses)
        self._mark_for_monitoring('reg_loss', reg_loss)
