diff --git a/python/paddle/nn/functional/conv.py b/python/paddle/nn/functional/conv.py index 9b5f63254809b191accc240b5b6f12623101e906..e636ee3cf9c5b0d3a3100561813dca57c605dfcd 100644 --- a/python/paddle/nn/functional/conv.py +++ b/python/paddle/nn/functional/conv.py @@ -614,10 +614,10 @@ def conv2d( the number of output channels, g is the number of groups, kH is the filter's height, kW is the filter's width. bias (Tensor, optional): The bias with shape [M,]. - stride (int|list|tuple): The stride size. It means the stride in convolution. + stride (int|list|tuple, optional): The stride size. It means the stride in convolution. If stride is a list/tuple, it must contain two integers, (stride_height, stride_width). Otherwise, stride_height = stride_width = stride. Default: stride = 1. - padding (string|int|list|tuple): The padding size. It means the number of zero-paddings + padding (string|int|list|tuple, optional): The padding size. It means the number of zero-paddings on both sides for each dimension.If `padding` is a string, either 'VALID' or 'SAME' which is the padding algorithm. If padding size is a tuple or list, it could be in three forms: `[pad_height, pad_width]` or @@ -627,11 +627,11 @@ def conv2d( when `data_format` is `"NHWC"`, `padding` can be in the form `[[0,0], [pad_height_top, pad_height_bottom], [pad_width_left, pad_width_right], [0,0]]`. Default: padding = 0. - dilation (int|list|tuple): The dilation size. It means the spacing between the kernel + dilation (int|list|tuple, optional): The dilation size. It means the spacing between the kernel points. If dilation is a list/tuple, it must contain two integers, (dilation_height, dilation_width). Otherwise, dilation_height = dilation_width = dilation. Default: dilation = 1. - groups (int): The groups number of the Conv2D Layer. According to grouped + groups (int, optional): The groups number of the Conv2D Layer. According to grouped convolution in Alex Krizhevsky's Deep CNN paper: when group=2, the first half of the filters is only connected to the first half of the input channels, while the second half of the filters is only diff --git a/python/paddle/nn/layer/conv.py b/python/paddle/nn/layer/conv.py index a3d719f67c1826a3ff923f6565280fb7364caae2..3131be49b5765d102551cd79c0f9d7f1762d83a8 100644 --- a/python/paddle/nn/layer/conv.py +++ b/python/paddle/nn/layer/conv.py @@ -449,7 +449,7 @@ class Conv1DTranspose(_ConvNd): in_channels(int): The number of channels in the input image. out_channels(int): The number of the filter. It is as same as the output feature map. - kernel_size(int|tuple|list, optional): The filter size. If kernel_size is a tuple/list, + kernel_size(int|tuple|list): The filter size. If kernel_size is a tuple/list, it must contain one integers, (kernel_size). None if use output size to calculate kernel_size. Default: None. kernel_size and output_size should not be None at the same time. @@ -598,7 +598,7 @@ class Conv2D(_ConvNd): Parameters: in_channels(int): The number of input channels in the input image. out_channels(int): The number of output channels produced by the convolution. - kernel_size(int|list|tuple, optional): The size of the convolving kernel. + kernel_size(int|list|tuple): The size of the convolving kernel. stride(int|list|tuple, optional): The stride size. If stride is a list/tuple, it must contain three integers, (stride_H, stride_W). Otherwise, the stride_H = stride_W = stride. The default value is 1. @@ -925,7 +925,7 @@ class Conv3D(_ConvNd): Parameters: in_channels(int): The number of input channels in the input image. out_channels(int): The number of output channels produced by the convolution. - kernel_size(int|list|tuple, optional): The size of the convolving kernel. + kernel_size(int|list|tuple): The size of the convolving kernel. stride(int|list|tuple, optional): The stride size. If stride is a list/tuple, it must contain three integers, (stride_D, stride_H, stride_W). Otherwise, the stride_D = stride_H = stride_W = stride. The default value is 1.