From 733da7b2fc2322a3df8a844fa039b66e9b2b35dd Mon Sep 17 00:00:00 2001 From: shippingwang Date: Wed, 27 Feb 2019 05:45:55 +0000 Subject: [PATCH] fixed typo, test=develop --- python/paddle/fluid/layers/learning_rate_scheduler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/learning_rate_scheduler.py b/python/paddle/fluid/layers/learning_rate_scheduler.py index 4c1996331ca..378aeb37605 100644 --- a/python/paddle/fluid/layers/learning_rate_scheduler.py +++ b/python/paddle/fluid/layers/learning_rate_scheduler.py @@ -313,9 +313,11 @@ def cosine_decay(learning_rate, step_each_epoch, epochs): """ Applies cosine decay to the learning rate. - when training a model, it is oftem recommended to lower the learning rate as the + when training a model, it is often recommended to lower the learning rate as the training progresses. By using this function, the learning rate will be decayed by following cosine decay strategy. + + decayed_lr = learning_rate * 0.5 * (math.cos(epoch * math.pi / epochs) + 1) Args: learning_rate(Variable|float): The initial learning rate. -- GitLab