@@ -817,16 +817,21 @@ class NormLayer(_ConcatInputLayer):
817
817
"""
818
818
layer_class = "norm"
819
819
820
- def __init__ (self , axes , param_shape = NotSpecified , scale = True , bias = True , epsilon = 1e-6 , ** kwargs ):
820
+ def __init__ (self , axis = NotSpecified , axes = NotSpecified ,
821
+ param_shape = NotSpecified , scale = True , bias = True , epsilon = 1e-6 , ** kwargs ):
821
822
"""
822
- :param Dim|str|list[Dim|str] axes: axes over which the mean and variance are computed, e.g. "F" or "TF"
823
+ :param Dim|str|list[Dim|str] axis: axis or axes over which the mean and variance are computed, e.g. "F" or "TF"
824
+ :param Dim|str|list[Dim|str] axes: axis or axes over which the mean and variance are computed, e.g. "F" or "TF"
823
825
:param Dim|str|list[Dim|str]|tuple[Dim|str] param_shape: shape of the scale and bias parameters.
824
826
You can also refer to (static) axes of the input, such as the feature-dim.
825
827
This is also the default, i.e. a param-shape of [F], independent of the axes to normalize over.
826
828
:param bool scale: add trainable scale parameters
827
829
:param bool bias: add trainable bias parameters
828
830
:param float epsilon: epsilon for numerical stability
829
831
"""
832
+ if axis is not NotSpecified :
833
+ assert axes is NotSpecified
834
+ axes = axis
830
835
super (NormLayer , self ).__init__ (** kwargs )
831
836
assert not self .input_data .sparse
832
837
x = self .input_data .placeholder
0 commit comments