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 optimizer init #27995

Merged
merged 1 commit into from
Oct 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions python/paddle/optimizer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@
# limitations under the License.

__all__ = [
'Adadelta', 'Adam', 'Adamax', 'AdamW', 'Momentum', 'MomentumOptimizer',
'RMSProp', 'SGD', 'SGDOptimizer', 'Optimizer', '_LRScheduler', 'NoamLR',
'PiecewiseLR', 'NaturalExpLR', 'InverseTimeLR', 'PolynomialLR',
'LinearLrWarmup', 'ExponentialLR', 'MultiStepLR', 'StepLR', 'LambdaLR',
'ReduceLROnPlateau', 'CosineAnnealingLR'
'Optimizer', 'Adagrad', 'Adam', 'AdamW', 'Adamax', 'RMSProp', 'Adadelta',
'SGD', 'Momentum', 'lr'
]


from .optimizer import Optimizer
from .adagrad import Adagrad
from .adam import Adam
Expand All @@ -30,5 +26,4 @@
from .adadelta import Adadelta
from .sgd import SGD
from .momentum import Momentum

from . import lr
4 changes: 2 additions & 2 deletions python/paddle/optimizer/lr.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LRScheduler(object):

LRScheduler Base class. Define the common interface of a learning rate scheduler.

User can import it by ``form paddle.optimizer.lr import LRScheduler`` ,
User can import it by ``from paddle.optimizer.lr import LRScheduler`` ,

then overload it for your subclass and have a custom implementation of ``get_lr()`` .

Expand All @@ -50,7 +50,7 @@ class LRScheduler(object):
.. code-block:: python

import paddle
form paddle.optimizer.lr import LRScheduler
from paddle.optimizer.lr import LRScheduler

class StepDecay(LRScheduler):
def __init__(self,
Expand Down
2 changes: 2 additions & 0 deletions tools/wlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
}
],
"wlist_temp_api":[
"LRScheduler",
"ReduceOnPlateau",
"append_LARS",
"BuildStrategy.debug_graphviz_path",
"BuildStrategy.enable_sequential_execution",
Expand Down