Skip to content

Commit

Permalink
fix optimizer init (#27995)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhwesky2010 authored Oct 19, 2020
1 parent a0b2f93 commit 086b92d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
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

0 comments on commit 086b92d

Please sign in to comment.