From 23e76da939743cc86e1b64995e8590b967d2e64a Mon Sep 17 00:00:00 2001 From: JiabinYang Date: Fri, 17 May 2019 08:54:38 +0000 Subject: [PATCH] test=develop, fix dygraph batch_norm --- python/paddle/fluid/dygraph/nn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/dygraph/nn.py b/python/paddle/fluid/dygraph/nn.py index d6360fedd4756..40804015b9c7b 100644 --- a/python/paddle/fluid/dygraph/nn.py +++ b/python/paddle/fluid/dygraph/nn.py @@ -1054,7 +1054,7 @@ def __init__(self, use_global_stats=False): super(BatchNorm, self).__init__(name_scope, dtype) self._param_attr = param_attr - self._param_attr = bias_attr + self._bias_attr = bias_attr self._act = act assert bias_attr is not False, "bias_attr should not be False in batch_norm." @@ -1076,7 +1076,7 @@ def __init__(self, self._scale.stop_gradient = True self._bias = self.create_parameter( - attr=self._param_attr, + attr=self._bias_attr, shape=param_shape, dtype=self._dtype, is_bias=True)