Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/paddle/nn/layer/norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(self,
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(
Expand All @@ -101,7 +102,7 @@ def forward(self, input):
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)


Expand Down