未验证 提交 e9a1669e 编写于 作者: Z Zhou Wei 提交者: GitHub

fix optimizer init (#27994)

上级 5c1babde
...@@ -13,14 +13,10 @@ ...@@ -13,14 +13,10 @@
# limitations under the License. # limitations under the License.
__all__ = [ __all__ = [
'Adadelta', 'Adam', 'Adamax', 'AdamW', 'Momentum', 'MomentumOptimizer', 'Optimizer', 'Adagrad', 'Adam', 'AdamW', 'Adamax', 'RMSProp', 'Adadelta',
'RMSProp', 'SGD', 'SGDOptimizer', 'Optimizer', '_LRScheduler', 'NoamLR', 'SGD', 'Momentum', 'lr'
'PiecewiseLR', 'NaturalExpLR', 'InverseTimeLR', 'PolynomialLR',
'LinearLrWarmup', 'ExponentialLR', 'MultiStepLR', 'StepLR', 'LambdaLR',
'ReduceLROnPlateau', 'CosineAnnealingLR'
] ]
from .optimizer import Optimizer from .optimizer import Optimizer
from .adagrad import Adagrad from .adagrad import Adagrad
from .adam import Adam from .adam import Adam
...@@ -30,5 +26,4 @@ from .rmsprop import RMSProp ...@@ -30,5 +26,4 @@ from .rmsprop import RMSProp
from .adadelta import Adadelta from .adadelta import Adadelta
from .sgd import SGD from .sgd import SGD
from .momentum import Momentum from .momentum import Momentum
from . import lr from . import lr
...@@ -30,7 +30,7 @@ class LRScheduler(object): ...@@ -30,7 +30,7 @@ class LRScheduler(object):
LRScheduler Base class. Define the common interface of a learning rate scheduler. 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()`` . then overload it for your subclass and have a custom implementation of ``get_lr()`` .
...@@ -50,7 +50,7 @@ class LRScheduler(object): ...@@ -50,7 +50,7 @@ class LRScheduler(object):
.. code-block:: python .. code-block:: python
import paddle import paddle
form paddle.optimizer.lr import LRScheduler from paddle.optimizer.lr import LRScheduler
class StepDecay(LRScheduler): class StepDecay(LRScheduler):
def __init__(self, def __init__(self,
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
} }
], ],
"wlist_temp_api":[ "wlist_temp_api":[
"LRScheduler",
"ReduceOnPlateau",
"append_LARS", "append_LARS",
"BuildStrategy.debug_graphviz_path", "BuildStrategy.debug_graphviz_path",
"BuildStrategy.enable_sequential_execution", "BuildStrategy.enable_sequential_execution",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册