From cf2db64bb690eb306c38410b24825258aec2a725 Mon Sep 17 00:00:00 2001 From: Weilong Wu Date: Tue, 3 Jan 2023 10:45:53 +0000 Subject: [PATCH] polish batch_norm api --- python/paddle/nn/functional/norm.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python/paddle/nn/functional/norm.py b/python/paddle/nn/functional/norm.py index 42f2ff170786b..87723f6bb8f58 100644 --- a/python/paddle/nn/functional/norm.py +++ b/python/paddle/nn/functional/norm.py @@ -20,7 +20,6 @@ from paddle import _C_ops, in_dynamic_mode from paddle.fluid.framework import in_dygraph_mode -from ...fluid import dygraph_utils from ...fluid.data_feeder import check_type, check_variable_and_dtype from ...fluid.layer_helper import LayerHelper @@ -210,10 +209,7 @@ def batch_norm( use_global_stats, trainable_statistics, ) - - return dygraph_utils._append_activation_in_dygraph( - batch_norm_out, act=None - ) + return batch_norm_out else: check_variable_and_dtype(