From 4ef704eb72cee882f206d5e4220ae84a45510e99 Mon Sep 17 00:00:00 2001 From: wangzhen38 <41941775+wangzhen38@users.noreply.github.com> Date: Tue, 28 Jun 2022 19:11:34 +0800 Subject: [PATCH] [UPDATE FLUID API] PaddleRec-related only (#43862) * [UPDATE FLUID API] only reference in paddlerec * change lr * [UPDATE FLUID API] only reference in paddlerec * update by reviews --- python/paddle/__init__.py | 1 + python/paddle/incubate/__init__.py | 2 ++ python/paddle/static/__init__.py | 6 +++++- python/paddle/static/nn/__init__.py | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/python/paddle/__init__.py b/python/paddle/__init__.py index e39affb84cd..6e47f4f9eab 100755 --- a/python/paddle/__init__.py +++ b/python/paddle/__init__.py @@ -35,6 +35,7 @@ from .framework import set_flags # noqa: F401 from .framework import disable_static # noqa: F401 from .framework import enable_static # noqa: F401 from .framework import in_dynamic_mode # noqa: F401 +from .fluid.dataset import * # noqa: F401 from .framework.dtype import dtype as dtype # noqa: F401 from .framework.dtype import uint8 # noqa: F401 diff --git a/python/paddle/incubate/__init__.py b/python/paddle/incubate/__init__.py index bad6fe7b713..bab1d92a836 100644 --- a/python/paddle/incubate/__init__.py +++ b/python/paddle/incubate/__init__.py @@ -35,6 +35,8 @@ from . import sparse #noqa: F401 from . import nn #noqa: F401 from . import asp #noqa: F401 +from ..fluid.incubate import fleet + __all__ = [ 'LookAhead', 'ModelAverage', diff --git a/python/paddle/static/__init__.py b/python/paddle/static/__init__.py index 191a76c6dc7..44ab1336061 100644 --- a/python/paddle/static/__init__.py +++ b/python/paddle/static/__init__.py @@ -64,11 +64,14 @@ from ..fluid.io import set_program_state # noqa: F401 from ..fluid.io import load_vars # noqa: F401 from ..fluid.io import save_vars # noqa: F401 +from ..fluid.io import batch # noqa: F401 from ..fluid.layers import create_parameter # noqa: F401 from ..fluid.layers import create_global_var # noqa: F401 from ..fluid.layers.metric_op import auc # noqa: F401 from ..fluid.layers.metric_op import accuracy # noqa: F401 +from ..fluid.contrib.layers import ctr_metric_bundle # noqa: F401 +from ..fluid.layers import exponential_decay # noqa: F401 __all__ = [ #noqa 'append_backward', 'gradients', 'Executor', 'global_scope', 'scope_guard', @@ -82,5 +85,6 @@ __all__ = [ #noqa 'deserialize_persistables', 'load_from_file', 'normalize_program', 'load_program_state', 'set_program_state', 'cpu_places', 'cuda_places', 'xpu_places', 'npu_places', 'mlu_places', 'Variable', 'create_global_var', - 'accuracy', 'auc', 'device_guard', 'create_parameter', 'set_ipu_shard' + 'accuracy', 'auc', 'device_guard', 'create_parameter', 'set_ipu_shard', + 'ctr_metric_bundle', 'exponential_decay' ] diff --git a/python/paddle/static/nn/__init__.py b/python/paddle/static/nn/__init__.py index cedef07ff84..41f8c99b526 100755 --- a/python/paddle/static/nn/__init__.py +++ b/python/paddle/static/nn/__init__.py @@ -41,6 +41,7 @@ from ...fluid.layers import while_loop # noqa: F401 from ...fluid.input import embedding # noqa: F401 from ...fluid.contrib.layers import sparse_embedding # noqa: F401 from ...fluid.layers import continuous_value_model # noqa: F401 +from ...fluid.layers import StaticRNN # noqa: F401 from ...fluid.layers.sequence_lod import sequence_conv # noqa: F401 from ...fluid.layers.sequence_lod import sequence_softmax # noqa: F401 @@ -99,4 +100,5 @@ __all__ = [ #noqa 'sequence_scatter', 'sequence_enumerate', 'sequence_reverse', + 'StaticRNN', ] -- GitLab