import tensorflow as tf

        Learning rate starting from `learning_rate` then increasing.

        It is computed as::

            decayed_learning_rate = (max_lr - learning_rate) *
                                    (floor(global_step / step_size) - global_step / step_size) +
                                    learning_rate
    """
    with tf.name_scope(name):
        learning_rate = tf.cast(learning_rate, dtype=tf.float32)
        global_step = tf.cast(global_step, dtype=tf.float32)
        step_size = tf.cast(step_size, dtype=tf.float32)
        max_lr = tf.cast(max_lr, dtype=tf.float32)

        if mode == 'tri':
            periodic_comp = tf.mod((global_step + step_size / 4) / step_size, 1)
