import tensorflow as tf

    correct = tf.equal(tf.arg_max(logits,1), tf.arg_max(labels,1))
    correct = tf.cast(correct, tf.int32)
    n_correct = tf.reduce_sum(correct)

    return n_correct

def optimize(loss, learning_rate, global_step):
    '''
    Optimization, use Gradient Descent as default
    '''
    with tf.name_scope('optimizer'):
        optimizer = tf.train.GradientDescentOptimizer(learning_rate=learning_rate)
        train_op = optimizer.minimize(loss, global_step=global_step)

    return train_op

def print_all_variables(train_only=True):
    '''
    Print all trainable and non-trainable variables
    '''
