From 8b10773b521edd4238adb80ffc859fb9664e3b75 Mon Sep 17 00:00:00 2001 From: yjphhw <43883055+yjphhw@users.noreply.github.com> Date: Fri, 9 Dec 2022 16:00:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E5=A4=9A=E4=B8=AA=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=8C=89=E7=85=A7=E8=A6=81=E6=B1=82=E4=BF=AE=E6=94=B9=20?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E4=B8=AD=E6=96=87=E7=9A=84#5453=20(#48886)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix doc * test=document_fix Co-authored-by: Ligoml <39876205+Ligoml@users.noreply.github.com> --- python/paddle/nn/functional/activation.py | 4 ++-- python/paddle/nn/functional/common.py | 6 +++--- python/paddle/nn/layer/activation.py | 2 +- python/paddle/nn/layer/common.py | 2 +- python/paddle/nn/layer/loss.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/python/paddle/nn/functional/activation.py b/python/paddle/nn/functional/activation.py index 92d6c25ea3..53871b26b0 100644 --- a/python/paddle/nn/functional/activation.py +++ b/python/paddle/nn/functional/activation.py @@ -813,9 +813,9 @@ def maxout(x, groups, axis=1, name=None): Parameters: x (Tensor): The input is 4-D Tensor with shape [N, C, H, W] or [N, H, W, C], the data type of input is float32 or float64. - groups (int, optional): The groups number of maxout. `groups` specifies the + groups (int): The groups number of maxout. `groups` specifies the index of channel dimension where maxout will be performed. This must be - a factor of number of features. Default is 1. + a factor of number of features. axis (int, optional): The axis along which to perform maxout calculations. It should be 1 when data format is NCHW, be -1 or 3 when data format is NHWC. If ``axis`` < 0, it works the same way as :math:`axis + D` , diff --git a/python/paddle/nn/functional/common.py b/python/paddle/nn/functional/common.py index 4fbb792ce8..83c216483e 100644 --- a/python/paddle/nn/functional/common.py +++ b/python/paddle/nn/functional/common.py @@ -70,17 +70,17 @@ def unfold(x, kernel_sizes, strides=1, paddings=0, dilations=1, name=None): data type can be float32 or float64 kernel_sizes(int|list): The size of convolution kernel, should be [k_h, k_w] or an integer k treated as [k, k]. - strides(int|list): The strides, should be [stride_h, stride_w] + strides(int|list, optional): The strides, should be [stride_h, stride_w] or an integer stride treated as [sride, stride]. For default, strides will be [1, 1]. - paddings(int|list): The paddings of each dimension, should be + paddings(int|list, optional): The paddings of each dimension, should be [padding_top, padding_left, padding_bottom, padding_right] or [padding_h, padding_w] or an integer padding. If [padding_h, padding_w] was given, it will expanded to [padding_h, padding_w, padding_h, padding_w]. If an integer padding was given, [padding, padding, padding, padding] will be used. For default, paddings will be [0, 0, 0, 0] - dilations(int|list): the dilations of convolution kernel, should be + dilations(int|list, optional): the dilations of convolution kernel, should be [dilation_h, dilation_w], or an integer dilation treated as [dilation, dilation]. For default, it will be [1, 1]. name(str, optional): The default value is None. diff --git a/python/paddle/nn/layer/activation.py b/python/paddle/nn/layer/activation.py index 1433b58700..99df2ffe43 100644 --- a/python/paddle/nn/layer/activation.py +++ b/python/paddle/nn/layer/activation.py @@ -1401,7 +1401,7 @@ class Maxout(Layer): \end{array} Parameters: - groups (int, optional): The groups number of maxout. `groups` specifies the + groups (int): The groups number of maxout. `groups` specifies the index of channel dimension where maxout will be performed. This must be a factor of number of features. Default is 1. axis (int, optional): The axis along which to perform maxout calculations. diff --git a/python/paddle/nn/layer/common.py b/python/paddle/nn/layer/common.py index 921643ef9d..3dd0eb3ccc 100644 --- a/python/paddle/nn/layer/common.py +++ b/python/paddle/nn/layer/common.py @@ -1533,7 +1533,7 @@ class Embedding(Layer): class Unfold(Layer): """ - This op returns a col buffer of sliding local blocks of input x, also known + Returns a col buffer of sliding local blocks of input x, also known as im2col for batched 2D image tensors. For each block under the convolution filter, all element will be rearranged as a column. While the convolution filter sliding over the input feature map, a series of such columns will be formed. diff --git a/python/paddle/nn/layer/loss.py b/python/paddle/nn/layer/loss.py index 2d5f57f2c5..51bad327b9 100644 --- a/python/paddle/nn/layer/loss.py +++ b/python/paddle/nn/layer/loss.py @@ -539,7 +539,7 @@ class MSELoss(Layer): Out = \operatorname{sum}((input - label)^2) where `input` and `label` are `float32` tensors of same shape. Parameters: - reduction (string, optional): The reduction method for the output, + reduction (str, optional): The reduction method for the output, could be 'none' | 'mean' | 'sum'. If :attr:`reduction` is ``'mean'``, the reduced mean loss is returned. If :attr:`size_average` is ``'sum'``, the reduced sum loss is returned. -- GitLab