未验证 提交 21366a92 编写于 作者: 小湉湉's avatar 小湉湉 提交者: GitHub

fix extra_repr in _InstanceNormBase, test=develop (#38537)

上级 d22f92ad
......@@ -75,6 +75,7 @@ class _InstanceNormBase(Layer):
self._epsilon = epsilon
self._weight_attr = weight_attr
self._bias_attr = bias_attr
self._num_features = num_features
if weight_attr != False and bias_attr != False:
self.scale = self.create_parameter(
......@@ -101,7 +102,7 @@ class _InstanceNormBase(Layer):
input, weight=self.scale, bias=self.bias, eps=self._epsilon)
def extra_repr(self):
return 'num_features={}, epsilon={}'.format(self.scale.shape[0],
return 'num_features={}, epsilon={}'.format(self._num_features,
self._epsilon)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册