Skip to content

Commit 79e8871

Browse files
committed
fix unittest
1 parent d91325f commit 79e8871

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

python/paddle/nn/layer/conv.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def __init__(self,
4444
out_channels,
4545
kernel_size,
4646
transposed,
47+
dims,
4748
stride=1,
4849
padding=0,
4950
padding_mode='zeros',
@@ -62,9 +63,10 @@ def __init__(self,
6263
self._out_channels = out_channels
6364
self._data_format = data_format
6465

65-
self._stride = utils.convert_to_list(stride, 2, 'stride')
66-
self._dilation = utils.convert_to_list(dilation, 2, 'dilation')
67-
self._kernel_size = utils.convert_to_list(kernel_size, 2, 'kernel_size')
66+
self._stride = utils.convert_to_list(stride, dims, 'stride')
67+
self._dilation = utils.convert_to_list(dilation, dims, 'dilation')
68+
self._kernel_size = utils.convert_to_list(kernel_size, dims,
69+
'kernel_size')
6870
self._padding = padding
6971
self.output_padding = output_padding
7072

@@ -426,6 +428,7 @@ def __init__(self,
426428
out_channels,
427429
kernel_size,
428430
True,
431+
2,
429432
stride=stride,
430433
padding=padding,
431434
dilation=dilation,
@@ -801,6 +804,7 @@ def __init__(self,
801804
out_channels,
802805
kernel_size,
803806
True,
807+
3,
804808
stride=stride,
805809
padding=padding,
806810
dilation=dilation,

0 commit comments

Comments
 (0)