Skip to content

Commit 62bad38

Browse files
committed
Change ConvTranspose1D to ConvTranspose1d
test=develop
1 parent 50e664a commit 62bad38

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

python/paddle/nn/layer/conv.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@
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

2725
import 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

Comments
 (0)