Skip to content

Commit a656e5c

Browse files
committed
fix optimizer init
1 parent aa3b4ed commit a656e5c

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

python/paddle/optimizer/__init__.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@
1313
# limitations under the License.
1414

1515
__all__ = [
16-
'Adadelta', 'Adam', 'Adamax', 'AdamW', 'Momentum', 'MomentumOptimizer',
17-
'RMSProp', 'SGD', 'SGDOptimizer', 'Optimizer', '_LRScheduler', 'NoamLR',
18-
'PiecewiseLR', 'NaturalExpLR', 'InverseTimeLR', 'PolynomialLR',
19-
'LinearLrWarmup', 'ExponentialLR', 'MultiStepLR', 'StepLR', 'LambdaLR',
20-
'ReduceLROnPlateau', 'CosineAnnealingLR'
16+
'Optimizer', 'Adagrad', 'Adam', 'AdamW', 'Adamax', 'RMSProp', 'Adadelta',
17+
'SGD', 'Momentum', 'lr'
2118
]
2219

23-
2420
from .optimizer import Optimizer
2521
from .adagrad import Adagrad
2622
from .adam import Adam
@@ -30,5 +26,4 @@
3026
from .adadelta import Adadelta
3127
from .sgd import SGD
3228
from .momentum import Momentum
33-
3429
from . import lr

python/paddle/optimizer/lr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LRScheduler(object):
3030
3131
LRScheduler Base class. Define the common interface of a learning rate scheduler.
3232
33-
User can import it by ``form paddle.optimizer.lr import LRScheduler`` ,
33+
User can import it by ``from paddle.optimizer.lr import LRScheduler`` ,
3434
3535
then overload it for your subclass and have a custom implementation of ``get_lr()`` .
3636
@@ -50,7 +50,7 @@ class LRScheduler(object):
5050
.. code-block:: python
5151
5252
import paddle
53-
form paddle.optimizer.lr import LRScheduler
53+
from paddle.optimizer.lr import LRScheduler
5454
5555
class StepDecay(LRScheduler):
5656
def __init__(self,

tools/wlist.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
}
2525
],
2626
"wlist_temp_api":[
27+
"LRScheduler",
28+
"ReduceOnPlateau",
2729
"append_LARS",
2830
"BuildStrategy.debug_graphviz_path",
2931
"BuildStrategy.enable_sequential_execution",

0 commit comments

Comments
 (0)