未验证 提交 c8d3b82c 编写于 作者: F FlyingQianMM 提交者: GitHub

fix the document for the api multiply (#45304)

* update the document for the api multiply

* update the document for the api multiply; test=document_fix

* update the document for the api multiply; test=document_fix

* update the document for the api multiply; test=document_fix

* note;test=document_fix
Co-authored-by: NLigoml <39876205+Ligoml@users.noreply.github.com>
上级 30b275f0
...@@ -342,8 +342,8 @@ def pow(x, y, name=None): ...@@ -342,8 +342,8 @@ def pow(x, y, name=None):
.. math:: .. math::
out = x^{y} out = x^{y}
**Note**: Note:
``paddle.pow`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` . ``paddle.pow`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` .
Args: Args:
...@@ -669,8 +669,8 @@ def divide(x, y, name=None): ...@@ -669,8 +669,8 @@ def divide(x, y, name=None):
.. math:: .. math::
out = x / y out = x / y
**Note**: Note:
``paddle.divide`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` . ``paddle.divide`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` .
Args: Args:
x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64. x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64.
...@@ -712,8 +712,8 @@ def floor_divide(x, y, name=None): ...@@ -712,8 +712,8 @@ def floor_divide(x, y, name=None):
.. math:: .. math::
out = x // y out = x // y
**Note**: Note:
``paddle.floor_divide`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` . ``paddle.floor_divide`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` .
Args: Args:
x (Tensor): the input tensor, it's data type should be int32, int64. x (Tensor): the input tensor, it's data type should be int32, int64.
...@@ -754,8 +754,8 @@ def remainder(x, y, name=None): ...@@ -754,8 +754,8 @@ def remainder(x, y, name=None):
out = x \% y out = x \% y
**Note**: Note:
``paddle.remainder`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` . ``paddle.remainder`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` .
Args: Args:
x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64. x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64.
...@@ -799,8 +799,8 @@ def multiply(x, y, name=None): ...@@ -799,8 +799,8 @@ def multiply(x, y, name=None):
.. math:: .. math::
out = x * y out = x * y
**Note**: Note:
``paddle.multiply`` supports broadcasting. If you would like to know more about broadcasting, please refer to :ref:`user_guide_broadcasting` . ``paddle.multiply`` supports broadcasting. If you would like to know more about broadcasting, please refer to :ref:`user_guide_broadcasting`.
Args: Args:
x (Tensor): the input tensor, its data type should be one of float32, float64, int32, int64, bool. x (Tensor): the input tensor, its data type should be one of float32, float64, int32, int64, bool.
...@@ -852,8 +852,8 @@ def maximum(x, y, name=None): ...@@ -852,8 +852,8 @@ def maximum(x, y, name=None):
.. math:: .. math::
out = max(x, y) out = max(x, y)
**Note**: Note:
``paddle.maximum`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` . ``paddle.maximum`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` .
Args: Args:
x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64. x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64.
...@@ -913,8 +913,8 @@ def minimum(x, y, name=None): ...@@ -913,8 +913,8 @@ def minimum(x, y, name=None):
.. math:: .. math::
out = min(x, y) out = min(x, y)
**Note**: Note:
``paddle.minimum`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` . ``paddle.minimum`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` .
Args: Args:
x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64. x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64.
...@@ -976,8 +976,8 @@ def fmax(x, y, name=None): ...@@ -976,8 +976,8 @@ def fmax(x, y, name=None):
.. math:: .. math::
out = fmax(x, y) out = fmax(x, y)
**Note**: Note:
``paddle.fmax`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` . ``paddle.fmax`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` .
Args: Args:
x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64. x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64.
...@@ -1039,8 +1039,8 @@ def fmin(x, y, name=None): ...@@ -1039,8 +1039,8 @@ def fmin(x, y, name=None):
.. math:: .. math::
out = fmin(x, y) out = fmin(x, y)
**Note**: Note:
``paddle.fmin`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` . ``paddle.fmin`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` .
Args: Args:
x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64. x (Tensor): the input tensor, it's data type should be float32, float64, int32, int64.
...@@ -1093,25 +1093,6 @@ def fmin(x, y, name=None): ...@@ -1093,25 +1093,6 @@ def fmin(x, y, name=None):
x, y, axis=axis, act=act, op_name=op_type) x, y, axis=axis, act=act, op_name=op_type)
return _elementwise_op(LayerHelper(op_type, **locals())) return _elementwise_op(LayerHelper(op_type, **locals()))
for func in [
multiply
]:
proto_dict = {'multiply': 'elementwise_mul'}
op_proto = OpProtoHolder.instance().get_op_proto(proto_dict[func.__name__])
additional_args_lines = [
"name (string, optional): Name of the output. \
Default is None. It's used to print debug info for developers. Details: \
:ref:`api_guide_Name` "
]
func.__doc__ = _generate_doc_string_(
op_proto,
additional_args_lines=additional_args_lines,
skip_attrs_set={"x_data_format", "y_data_format", "axis",
"use_quantizer", "mkldnn_data_type", "Scale_x", "Scale_y", "Scale_out"
}) + """\n""" + str(func.__doc__)
def sum(x, axis=None, dtype=None, keepdim=False, name=None): def sum(x, axis=None, dtype=None, keepdim=False, name=None):
""" """
...@@ -3046,8 +3027,8 @@ def cumsum(x, axis=None, dtype=None, name=None): ...@@ -3046,8 +3027,8 @@ def cumsum(x, axis=None, dtype=None, name=None):
""" """
The cumulative sum of the elements along a given axis. The cumulative sum of the elements along a given axis.
**Note**: Note:
The first element of the result is the same as the first element of the input. The first element of the result is the same as the first element of the input.
Args: Args:
x (Tensor): The input tensor needed to be cumsumed. x (Tensor): The input tensor needed to be cumsumed.
...@@ -3185,8 +3166,8 @@ def cumprod(x, dim=None, dtype=None, name=None): ...@@ -3185,8 +3166,8 @@ def cumprod(x, dim=None, dtype=None, name=None):
""" """
Compute the cumulative product of the input tensor x along a given dimension dim. Compute the cumulative product of the input tensor x along a given dimension dim.
**Note**: Note:
The first element of the result is the same as the first element of the input. The first element of the result is the same as the first element of the input.
Args: Args:
x (Tensor): the input tensor need to be cumproded. x (Tensor): the input tensor need to be cumproded.
...@@ -3521,7 +3502,7 @@ def tanh_(x, name=None): ...@@ -3521,7 +3502,7 @@ def tanh_(x, name=None):
def increment(x, value=1.0, name=None): def increment(x, value=1.0, name=None):
""" """
The OP is usually used for control flow to increment the data of :attr:`x` by an amount :attr:`value`. The API is usually used for control flow to increment the data of :attr:`x` by an amount :attr:`value`.
Notice that the number of elements in :attr:`x` must be equal to 1. Notice that the number of elements in :attr:`x` must be equal to 1.
Args: Args:
...@@ -4669,7 +4650,7 @@ def heaviside(x, y, name=None): ...@@ -4669,7 +4650,7 @@ def heaviside(x, y, name=None):
\end{array} \end{array}
\\right. \\right.
Notes: Note:
``paddle.heaviside`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting`. ``paddle.heaviside`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting`.
Args: Args:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册