1515# TODO: define classes of convolutional neural network
1616
1717__all__ = [
18- 'ConvTranspose1D ' ,
18+ 'ConvTranspose1d ' ,
1919 'Conv2D' ,
2020 'ConvTranspose2d' ,
2121 'Conv3D' ,
2222 'ConvTranspose3d' ,
23- # 'TreeConv',
24- # 'Conv1D'
2523]
2624
2725import numpy as np
@@ -281,9 +279,9 @@ def forward(self, input):
281279 return out
282280
283281
284- class ConvTranspose1D (layers .Layer ):
282+ class ConvTranspose1d (layers .Layer ):
285283 """
286- This interface is used to construct a callable object of the ``Conv1DTranspose `` class.
284+ This interface is used to construct a callable object of the ``ConvTranspose1d `` class.
287285 For more details, refer to code examples.
288286 The 1-D convolution transpose layer calculates the output based on the input,
289287 filter, and dilation, stride, padding. Input(Input) and output(Output)
@@ -394,7 +392,7 @@ class ConvTranspose1D(layers.Layer):
394392 .. code-block:: python
395393
396394 import paddle
397- from paddle.nn import ConvTranspose1D
395+ from paddle.nn import ConvTranspose1d
398396 import numpy as np
399397
400398 paddle.disable_static()
@@ -405,7 +403,7 @@ class ConvTranspose1D(layers.Layer):
405403 y=np.array([[[7, 0]],
406404 [[4, 2]]]).astype(np.float32)
407405 x_t = paddle.to_tensor(x)
408- conv = ConvTranspose1D (2, 1, 2)
406+ conv = ConvTranspose1d (2, 1, 2)
409407 conv.weight.set_value(y)
410408 y_t = conv(x_t)
411409 y_np = y_t.numpy()
@@ -427,8 +425,8 @@ def __init__(self,
427425 weight_attr = None ,
428426 bias_attr = None ,
429427 data_format = "NCL" ):
430- super (ConvTranspose1D , self ).__init__ ()
431- assert weight_attr is not False , "param_attr should not be False in ConvTranspose1D ."
428+ super (ConvTranspose1d , self ).__init__ ()
429+ assert weight_attr is not False , "param_attr should not be False in ConvTranspose1d ."
432430 self ._param_attr = weight_attr
433431 self ._bias_attr = bias_attr
434432 self ._groups = groups
0 commit comments