Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix api name, english doc, unittest, and remove useless alias of 2.0 lr_scheduler #27686

Merged
merged 11 commits into from
Oct 13, 2020

Conversation

zhwesky2010
Copy link
Contributor

@zhwesky2010 zhwesky2010 commented Sep 28, 2020

PR types

New features

PR changes

APIs

Describe

image

image

image

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@zhwesky2010 zhwesky2010 changed the title fix doc and unittest of 2.0 lr_scheduler fix english doc、unittest、remove useless alias of 2.0 lr_scheduler Sep 29, 2020
@zhwesky2010 zhwesky2010 changed the title fix english doc、unittest、remove useless alias of 2.0 lr_scheduler fix english doc, unittest, remove useless alias of 2.0 lr_scheduler Sep 29, 2020
@zhwesky2010 zhwesky2010 changed the title fix english doc, unittest, remove useless alias of 2.0 lr_scheduler fix english doc, unittest, and remove useless alias of 2.0 lr_scheduler Sep 29, 2020
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Sep 29, 2020
@PaddlePaddle PaddlePaddle unlocked this conversation Sep 29, 2020
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Sep 30, 2020
@PaddlePaddle PaddlePaddle unlocked this conversation Sep 30, 2020
@zhwesky2010 zhwesky2010 force-pushed the fix_lr_scheduler_2.0 branch 2 times, most recently from 3f7b738 to 8e9e055 Compare September 30, 2020 07:24
XiaoguangHu01
XiaoguangHu01 previously approved these changes Oct 12, 2020
Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

paddle.disable_static()
emb = paddle.nn.Embedding(10, 10)
adam = paddle.optimizer.Adam(0.001, parameters = emb.parameters())
lr = adam.get_lr()
print(lr) # 0.001

# example2: PiecewiseLR is used, return the step learning rate
# example2: PiecewiseDecay is used, return the step learning rate
paddle.disable_static()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行可以删除

@@ -370,14 +372,14 @@ def get_lr(self):

import numpy as np
import paddle
# example1: _LRScheduler is not used, return value is all the same
# example1: LRScheduler is not used, return value is all the same
paddle.disable_static()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行可以删除

@@ -156,31 +213,29 @@ class NoamLR(_LRScheduler):
verbose (bool, optional): If ``True``, prints a message to stdout for each update. Default: ``False`` .

Returns:
``NoamLR`` instance to schedule learning rate.
``NoamDecay`` instance to schedule learning rate.

Examples:
.. code-block:: python

import paddle
import numpy as np

This comment was marked as resolved.

@@ -262,23 +317,21 @@ class PiecewiseLR(_LRScheduler):
import paddle
import numpy as np

This comment was marked as resolved.

@@ -346,23 +399,21 @@ class NaturalExpLR(_LRScheduler):
import paddle
import numpy as np

This comment was marked as resolved.

@@ -939,23 +984,21 @@ class StepLR(_LRScheduler):
import paddle
import numpy as np

This comment was marked as resolved.

@@ -1035,23 +1078,21 @@ class LambdaLR(_LRScheduler):
import paddle
import numpy as np

This comment was marked as resolved.

@@ -1135,23 +1176,21 @@ class ReduceLROnPlateau(_LRScheduler):
import paddle
import numpy as np

This comment was marked as resolved.

@@ -1352,23 +1382,21 @@ class CosineAnnealingLR(_LRScheduler):
import paddle
import numpy as np

This comment was marked as resolved.

@@ -370,14 +372,14 @@ def get_lr(self):

import numpy as np
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行可以删除

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Done

Copy link
Contributor

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@raindrops2sea raindrops2sea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zhwesky2010 zhwesky2010 merged commit e122e16 into PaddlePaddle:develop Oct 13, 2020
chen-zhiyu pushed a commit to chen-zhiyu/Paddle that referenced this pull request Oct 15, 2020
…er (PaddlePaddle#27686)

* fix doc and unittest of 2.0 lr_scheduler

* fix doc of 2.0 lr_scheduler

* fix unittest

* fix english doc of lr_scheduler

* fix api name of lr scheduler

* fix api name of lr scheduler
@zhwesky2010 zhwesky2010 changed the title fix english doc, unittest, and remove useless alias of 2.0 lr_scheduler fix api name, english doc, unittest, and remove useless alias of 2.0 lr_scheduler Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants