diff --git a/python/paddle/nn/layer/conv.py b/python/paddle/nn/layer/conv.py index e0ab183f51bcb..5b6d295458cfa 100644 --- a/python/paddle/nn/layer/conv.py +++ b/python/paddle/nn/layer/conv.py @@ -759,7 +759,10 @@ class Conv2DTranspose(_ConvNd): * :math:`\ast`: Convolution operation. * :math:`b`: Bias value, a 1-D ``Tensor`` with shape [M]. * :math:`\sigma`: Activation function. - * :math:`Out`: Output value, the shape of :math:`Out` and :math:`X` may be different. + * :math:`Out`: Output value, a 4-D ``Tensor`` with NCHW or NHWC format, the shape of :math:`Out` and :math:`X` may be different. + + Note: + If output_size is None, :math:`H_{out}` = :math:`H^\prime_{out}` , :math:`W_{out}` = :math:`W^\prime_{out}`. Otherwise, the specified output_size_height (the height of the output feature layer) :math:`H_{out}` should be between :math:`H^\prime_{out}` and :math:`H^\prime_{out} + strides[0]` (excluding :math:`H^\prime_{out} + strides[0]` ). Parameters: in_channels(int): The number of channels in the input image. diff --git a/python/paddle/static/input.py b/python/paddle/static/input.py index 44554ea090c2c..59048de547811 100644 --- a/python/paddle/static/input.py +++ b/python/paddle/static/input.py @@ -162,6 +162,7 @@ class InputSpec: uint8. Default: float32. name (str): The name/alias of the variable, see :ref:`api_guide_Name` for more details. + stop_gradient (bool, optional): A boolean that mentions whether gradient should flow. Default is False, means don't stop calculate gradients. Examples: .. code-block:: python diff --git a/python/paddle/tensor/manipulation.py b/python/paddle/tensor/manipulation.py index 62de7b884275b..57047e7c15c6b 100644 --- a/python/paddle/tensor/manipulation.py +++ b/python/paddle/tensor/manipulation.py @@ -2900,11 +2900,7 @@ def scatter(x, index, updates, overwrite=True, name=None): x (Tensor): The input N-D Tensor with ndim>=1. Data type can be float32, float64. index (Tensor): The index is a 1-D or 0-D Tensor. Data type can be int32, int64. The length of index cannot exceed updates's length, and the value in index cannot exceed input's length. updates (Tensor): Update input with updates parameter based on index. When the index is a 1-D tensor, the updates shape should be the same as input, and dim value with dim > 1 should be the same as input. When the index is a 0-D tensor, the updates should be a (N-1)-D tensor, the ith dim of the updates should be queal with the (i+1)th dim of the input. - overwrite (bool, optional): The mode that updating the output when there are same indices. - - If True, use the overwrite mode to update the output of the same index, - if False, use the accumulate mode to update the output of the same index. Default value is True. - + overwrite (bool, optional): The mode that updating the output when there are same indices.If True, use the overwrite mode to update the output of the same index,if False, use the accumulate mode to update the output of the same index. Default value is True. name(str, optional): The default value is None. Normally there is no need for user to set this property. For more information, please refer to :ref:`api_guide_Name` . Returns: diff --git a/python/paddle/tensor/math.py b/python/paddle/tensor/math.py index eae8eff6e506b..c409e46c6378e 100644 --- a/python/paddle/tensor/math.py +++ b/python/paddle/tensor/math.py @@ -643,16 +643,11 @@ def add(x, y, name=None): $X$ the tensor of any dimension. $Y$ the tensor whose dimensions must be less than or equal to the dimensions of $X$. - There are two cases for this operator: + This operator is used in the following cases: 1. The shape of $Y$ is the same with $X$. 2. The shape of $Y$ is a continuous subsequence of $X$. - For case 2: - - 1. Broadcast $Y$ to match the shape of $X$, where axis is the start dimension index for broadcasting $Y$ onto $X$. - 2. If $axis$ is -1 (default), $axis$=rank($X$)-rank($Y$). - 3. The trailing dimensions of size 1 for $Y$ will be ignored for the consideration of subsequence, such as shape($Y$) = (2, 1) => (2). For example: diff --git a/python/paddle/tensor/random.py b/python/paddle/tensor/random.py index bbfc533c5fc92..f3d82a492f6aa 100644 --- a/python/paddle/tensor/random.py +++ b/python/paddle/tensor/random.py @@ -1078,7 +1078,7 @@ def rand(shape, dtype=None, name=None): If ``shape`` is an Tensor, it should be an 1-D Tensor which represents a list. dtype (str|np.dtype, optional): The data type of the output Tensor. Supported data types: float32, float64. - Default is None, use global default dtype (see ``get_default_dtype`` + Default is None, use global default dtype (see :ref:`get_default_dtype` for details). name (str, optional): The default value is None. Normally there is no need for user to set this property. For more information, please diff --git a/python/paddle/vision/models/resnet.py b/python/paddle/vision/models/resnet.py index d91cd66f04f5d..cb270154dd849 100644 --- a/python/paddle/vision/models/resnet.py +++ b/python/paddle/vision/models/resnet.py @@ -438,7 +438,7 @@ def resnet50(pretrained=False, **kwargs): Args: pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained on ImageNet. Default: False. - **kwargs (optional): Additional keyword arguments. For details, please refer to :ref:`ResNet `. + **kwargs (optional): Additional keyword arguments. For details, please refer to :ref:`ResNet `. Returns: :ref:`api_paddle_nn_Layer`. An instance of ResNet 50-layer model.