From 6b95e674b782b7a2769bb7cff2f67761d9f1ccb0 Mon Sep 17 00:00:00 2001 From: zhiboniu <31800336+zhiboniu@users.noreply.github.com> Date: Tue, 6 Jul 2021 15:13:23 +0800 Subject: [PATCH] public api:add bn\ln\in; add static.xpu_place (#33897) --- python/paddle/fluid/framework.py | 3 ++- python/paddle/nn/functional/__init__.py | 5 ++++- python/paddle/static/__init__.py | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 9e06f107a3..194a3bc973 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -489,7 +489,8 @@ def xpu_places(device_ids=None): list of paddle.XPUPlace: Created XPU place list. Examples: .. code-block:: python - + # required: xpu + import paddle import paddle.static as static diff --git a/python/paddle/nn/functional/__init__.py b/python/paddle/nn/functional/__init__.py index ff18afa9d2..f3d9f9dde1 100644 --- a/python/paddle/nn/functional/__init__.py +++ b/python/paddle/nn/functional/__init__.py @@ -195,5 +195,8 @@ __all__ = [ #noqa 'gather_tree', 'one_hot', 'normalize', - 'temporal_shift' + 'temporal_shift', + 'batch_norm', + 'layer_norm', + 'instance_norm' ] diff --git a/python/paddle/static/__init__.py b/python/paddle/static/__init__.py index 93394f9b5a..93f34b2297 100644 --- a/python/paddle/static/__init__.py +++ b/python/paddle/static/__init__.py @@ -96,6 +96,7 @@ __all__ = [ #noqa 'set_program_state', 'cpu_places', 'cuda_places', + 'xpu_places', 'Variable', 'create_global_var', 'accuracy', -- GitLab