未验证 提交 1b83de2e 编写于 作者: Z zhiboniu 提交者: GitHub

update 2.0 public api in optimizer (#31944)

上级 7a681f0b
......@@ -12,19 +12,27 @@
# See the License for the specific language governing permissions and
# limitations under the License.
__all__ = [
'Optimizer', 'Adagrad', 'Adam', 'AdamW', 'Adamax', 'RMSProp', 'Adadelta',
'SGD', 'Momentum', 'Lamb', 'lr'
]
from .optimizer import Optimizer # noqa: F401
from .adagrad import Adagrad # noqa: F401
from .adam import Adam # noqa: F401
from .adamw import AdamW # noqa: F401
from .adamax import Adamax # noqa: F401
from .rmsprop import RMSProp # noqa: F401
from .adadelta import Adadelta # noqa: F401
from .sgd import SGD # noqa: F401
from .momentum import Momentum # noqa: F401
from .lamb import Lamb # noqa: F401
from . import lr # noqa: F401
from .optimizer import Optimizer
from .adagrad import Adagrad
from .adam import Adam
from .adamw import AdamW
from .adamax import Adamax
from .rmsprop import RMSProp
from .adadelta import Adadelta
from .sgd import SGD
from .momentum import Momentum
from .lamb import Lamb
from . import lr
__all__ = [ #noqa
'Optimizer',
'Adagrad',
'Adam',
'AdamW',
'Adamax',
'RMSProp',
'Adadelta',
'SGD',
'Momentum',
'Lamb'
]
......@@ -17,8 +17,6 @@ from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable, name_scope
__all__ = ["Adadelta"]
class Adadelta(Optimizer):
r"""
......
......@@ -17,8 +17,6 @@ from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable
__all__ = ["Adagrad"]
class Adagrad(Optimizer):
r"""
......
......@@ -24,8 +24,6 @@ from ..fluid.dygraph import base as imperative_base
import paddle
__all__ = ["Adam"]
class Adam(Optimizer):
r"""
......
......@@ -17,8 +17,6 @@ from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable, name_scope
__all__ = ["Adamax"]
class Adamax(Optimizer):
r"""
......
......@@ -19,8 +19,6 @@ from ..fluid import framework
from ..fluid.dygraph import base as imperative_base
import paddle
__all__ = ['AdamW']
class AdamW(Adam):
r"""
......
......@@ -17,8 +17,6 @@ from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable
__all__ = ["Lamb"]
class Lamb(Optimizer):
r"""
......
......@@ -17,10 +17,19 @@ import numpy
import warnings
from paddle import Tensor
__all__ = [
'LRScheduler', 'NoamDecay', 'PiecewiseDecay', 'NaturalExpDecay',
'InverseTimeDecay', 'PolynomialDecay', 'LinearWarmup', 'ExponentialDecay',
'MultiStepDecay', 'StepDecay', 'LambdaDecay', 'ReduceOnPlateau',
__all__ = [ #noqa
'LRScheduler',
'NoamDecay',
'PiecewiseDecay',
'NaturalExpDecay',
'InverseTimeDecay',
'PolynomialDecay',
'LinearWarmup',
'ExponentialDecay',
'MultiStepDecay',
'StepDecay',
'LambdaDecay',
'ReduceOnPlateau',
'CosineAnnealingDecay'
]
......
......@@ -21,7 +21,6 @@ from ..fluid import unique_name
from ..fluid import layers
import paddle.fluid as fluid
from paddle.fluid.regularizer import L2DecayRegularizer
__all__ = ["Momentum"]
class Momentum(Optimizer):
......
......@@ -42,8 +42,6 @@ from ..fluid.wrapped_decorator import signature_safe_contextmanager
from .. import compat as cpt
from .lr import LRScheduler
__all__ = ['Optimizer']
class Optimizer(object):
r"""Optimizer Base class.
......
......@@ -17,8 +17,6 @@ from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable
__all__ = ["RMSProp"]
class RMSProp(Optimizer):
r"""
......
......@@ -17,7 +17,6 @@ from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable, name_scope
from ..fluid.dygraph import no_grad
__all__ = ["SGD"]
class SGD(Optimizer):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册