import tensorflow as tf

        tf.summary.scalar(scope+'/loss', loss)

    return loss

def accuracy(logits, labels):
    '''
    Evaluate the quality of the logits at predicting the label
    '''
    # for summary
    with tf.name_scope('accuracy') as scope:
        correct = tf.equal(tf.arg_max(logits,1), tf.arg_max(labels,1))
        correct = tf.cast(correct, tf.float32)
        accuracy = tf.reduce_mean(correct)*100.0
        tf.summary.scalar(scope+'accuracy',accuracy)

    return accuracy

def num_correct_prediction(logits, labels):
    '''
    Evaluate the quality of the logits at predicting the label
    '''
    correct = tf.equal(tf.arg_max(logits,1), tf.arg_max(labels,1))
