import tensorflow as tf

        # 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)

        # Add loss from auxiliary logits
        aux_loss = tf.constant(0, dtype=tf.float32)
        for aux_logits in aux_logits_list:
            log_probs = tf.nn.sparse_softmax_cross_entropy_with_logits(logits=aux_logits, labels=classes)
