未验证 提交 d2682a84 编写于 作者: J Jiabin Yang 提交者: GitHub

test=develop, fix dygraph batch_norm (#17465)

上级 1eb15175
......@@ -1054,7 +1054,7 @@ class BatchNorm(layers.Layer):
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 @@ class BatchNorm(layers.Layer):
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册