From a7197bfb723c63550e9c7a3c718b78872fb84d20 Mon Sep 17 00:00:00 2001 From: frankwhzhang Date: Mon, 28 Sep 2020 03:22:02 +0000 Subject: [PATCH] fix norm api doc, test=develop --- python/paddle/nn/__init__.py | 1 - python/paddle/nn/layer/norm.py | 8 ++++---- python/paddle/static/nn/__init__.py | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/python/paddle/nn/__init__.py b/python/paddle/nn/__init__.py index b79b965f5b9..67f6b07f619 100644 --- a/python/paddle/nn/__init__.py +++ b/python/paddle/nn/__init__.py @@ -142,7 +142,6 @@ from .layer.norm import SyncBatchNorm #DEFINE_ALIAS from .layer.norm import GroupNorm #DEFINE_ALIAS from .layer.norm import LayerNorm #DEFINE_ALIAS from .layer.norm import SpectralNorm #DEFINE_ALIAS -from .layer.norm import InstanceNorm #DEFINE_ALIAS from .layer.norm import InstanceNorm1d #DEFINE_ALIAS from .layer.norm import InstanceNorm2d #DEFINE_ALIAS from .layer.norm import InstanceNorm3d #DEFINE_ALIAS diff --git a/python/paddle/nn/layer/norm.py b/python/paddle/nn/layer/norm.py index 2000fbf388f..60f826649a1 100644 --- a/python/paddle/nn/layer/norm.py +++ b/python/paddle/nn/layer/norm.py @@ -28,7 +28,7 @@ # TODO: define normalization api import six -from ...fluid.dygraph.nn import InstanceNorm +#from ...fluid.dygraph.nn import InstanceNorm from ...fluid.dygraph import BatchNorm #DEFINE_ALIAS #from ...fluid.dygraph import GroupNorm #DEFINE_ALIAS @@ -53,9 +53,9 @@ import warnings from ...fluid.dygraph.base import no_grad __all__ = [ - 'BatchNorm', 'GroupNorm', 'LayerNorm', 'SpectralNorm', 'InstanceNorm', - 'BatchNorm1d', 'BatchNorm2d', 'BatchNorm3d', 'InstanceNorm1d', - 'InstanceNorm2d', 'InstanceNorm3d', 'SyncBatchNorm' + 'BatchNorm', 'GroupNorm', 'LayerNorm', 'SpectralNorm', 'BatchNorm1d', + 'BatchNorm2d', 'BatchNorm3d', 'InstanceNorm1d', 'InstanceNorm2d', + 'InstanceNorm3d', 'SyncBatchNorm' ] diff --git a/python/paddle/static/nn/__init__.py b/python/paddle/static/nn/__init__.py index 510e11312f4..52b95d92d7e 100644 --- a/python/paddle/static/nn/__init__.py +++ b/python/paddle/static/nn/__init__.py @@ -26,7 +26,6 @@ __all__ = [ 'crf_decoding', 'data_norm', 'deformable_conv', - 'group_norm', 'hsigmoid', 'instance_norm', 'layer_norm', @@ -50,7 +49,7 @@ from ...fluid.layers import create_parameter #DEFINE_ALIAS from ...fluid.layers import crf_decoding #DEFINE_ALIAS from ...fluid.layers import data_norm #DEFINE_ALIAS from ...fluid.layers import deformable_conv #DEFINE_ALIAS -from ...fluid.layers import group_norm #DEFINE_ALIAS +#from ...fluid.layers import group_norm #DEFINE_ALIAS from ...fluid.layers import hsigmoid #DEFINE_ALIAS from ...fluid.layers import instance_norm #DEFINE_ALIAS from ...fluid.layers import layer_norm #DEFINE_ALIAS -- GitLab