@@ -35,8 +35,12 @@ def __init__(self,
3535 if bias_attr is None :
3636 bias_attr = paddle .ParamAttr (
3737 initializer = nn .initializer .Constant (0.0 ))
38- super (LayerNorm , self ).__init__ (normalized_shape , epsilon , weight_attr ,
39- bias_attr , name )
38+ super (LayerNorm , self ).__init__ (
39+ normalized_shape = normalized_shape ,
40+ epsilon = epsilon ,
41+ weight_attr = weight_attr ,
42+ bias_attr = bias_attr ,
43+ name = name )
4044
4145
4246class BatchNorm1D (nn .BatchNorm1D ):
@@ -54,9 +58,14 @@ def __init__(self,
5458 if bias_attr is None :
5559 bias_attr = paddle .ParamAttr (
5660 initializer = nn .initializer .Constant (0.0 ))
57- super (BatchNorm1D ,
58- self ).__init__ (num_features , momentum , epsilon , weight_attr ,
59- bias_attr , data_format , name )
61+ super (BatchNorm1D , self ).__init__ (
62+ num_features = num_features ,
63+ momentum = momentum ,
64+ epsilon = epsilon ,
65+ weight_attr = weight_attr ,
66+ bias_attr = bias_attr ,
67+ data_format = data_format ,
68+ name = name )
6069
6170
6271class Embedding (nn .Embedding ):
@@ -99,8 +108,12 @@ def __init__(self,
99108 fan_in = None ,
100109 negative_slope = math .sqrt (5 ),
101110 nonlinearity = 'leaky_relu' ))
102- super (Linear , self ).__init__ (in_features , out_features , weight_attr ,
103- bias_attr , name )
111+ super (Linear , self ).__init__ (
112+ in_features = in_features ,
113+ out_features = out_features ,
114+ weight_attr = weight_attr ,
115+ bias_attr = bias_attr ,
116+ name = name )
104117
105118
106119class Conv1D (nn .Conv1D ):
@@ -131,8 +144,17 @@ def __init__(self,
131144 negative_slope = math .sqrt (5 ),
132145 nonlinearity = 'leaky_relu' ))
133146 super (Conv1D , self ).__init__ (
134- in_channels , out_channels , kernel_size , stride , padding , dilation ,
135- groups , padding_mode , weight_attr , bias_attr , data_format )
147+ in_channels = in_channels ,
148+ out_channels = out_channels ,
149+ kernel_size = kernel_size ,
150+ stride = stride ,
151+ padding = padding ,
152+ dilation = dilation ,
153+ groups = groups ,
154+ padding_mode = padding_mode ,
155+ weight_attr = weight_attr ,
156+ bias_attr = bias_attr ,
157+ data_format = data_format )
136158
137159
138160class Conv2D (nn .Conv2D ):
@@ -163,5 +185,14 @@ def __init__(self,
163185 negative_slope = math .sqrt (5 ),
164186 nonlinearity = 'leaky_relu' ))
165187 super (Conv2D , self ).__init__ (
166- in_channels , out_channels , kernel_size , stride , padding , dilation ,
167- groups , padding_mode , weight_attr , bias_attr , data_format )
188+ in_channels = in_channels ,
189+ out_channels = out_channels ,
190+ kernel_size = kernel_size ,
191+ stride = stride ,
192+ padding = padding ,
193+ dilation = dilation ,
194+ groups = groups ,
195+ padding_mode = padding_mode ,
196+ weight_attr = weight_attr ,
197+ bias_attr = bias_attr ,
198+ data_format = data_format )
0 commit comments