(learning_rate, num_epoch, steps_one_epoch)
return decayed_lr
Applies cosine decay to the learning rate.
    lr = 0.5 * (math.cos(epoch * (math.pi / 120)) + 1)
Applies cosine decay to the learning rate.
    lr = 0.5 * (math.cos(epoch * (math.pi / 120)) + 1)
Applies cosine decay to the learning rate . lr = 0 . 5 * ( math . cos ( epoch * ( math . pi / 120 )) + 1 )
def cosine_decay(learning_rate, num_epoch, steps_one_epoch):
    """Applies cosine decay to the learning rate.
    lr = 0.5 * (math.cos(epoch * (math.pi / 120)) + 1)
    """
    global_step = _decay_step_counter()

    decayed_lr = learning_rate * \
             (ops.cos(fluid.layers.floor(global_step / steps_one_epoch) \
             * math.pi / num_epoch) + 1)/2
    return decayed_lr
def cosine_decay ( learning_rate , num_epoch , steps_one_epoch ) : global_step = _decay_step_counter ( ) decayed_lr = learning_rate * ( ops . cos ( fluid . layers . floor ( global_step / steps_one_epoch ) * math . pi / num_epoch ) + 1 ) / 2 return decayed_lr