diff --git a/doc/fluid/api/tensor/math.rst b/doc/fluid/api/tensor/math.rst index f79e3e0de6cd0e70fafdc2f2ad6ce4966493ef56..8afa8020941359f9391e81b4ab043a5467ffc516 100644 --- a/doc/fluid/api/tensor/math.rst +++ b/doc/fluid/api/tensor/math.rst @@ -22,6 +22,7 @@ math math/min.rst math/mm.rst math/mul.rst + math/multiply.rst math/pow.rst math/prod.rst math/sign.rst diff --git a/doc/fluid/api/tensor/math/multiply.rst b/doc/fluid/api/tensor/math/multiply.rst new file mode 100644 index 0000000000000000000000000000000000000000..e483e0214e2caac2d38d489d9071be005f4cdb19 --- /dev/null +++ b/doc/fluid/api/tensor/math/multiply.rst @@ -0,0 +1,9 @@ +.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` + !DO NOT EDIT THIS FILE MANUALLY! +.. _api_tensor_math_multiply: + +multiply +-------- + + .. autofunction:: paddle.tensor.math.multiply + :noindex: \ No newline at end of file diff --git a/doc/fluid/api_cn/tensor_cn.rst b/doc/fluid/api_cn/tensor_cn.rst index 2faa62d9b97f6a989b6ac61df05b1a48ad72f6d5..c2d1d9fcb985c1cd050abb076d8de9446dad18ab 100644 --- a/doc/fluid/api_cn/tensor_cn.rst +++ b/doc/fluid/api_cn/tensor_cn.rst @@ -104,6 +104,7 @@ paddle.tensor tensor_cn/mm_cn.rst tensor_cn/mul_cn.rst tensor_cn/multiplex_cn.rst + tensor_cn/multiply_cn.rst tensor_cn/nonzero_cn.rst tensor_cn/norm_cn.rst tensor_cn/normal_cn.rst diff --git a/doc/fluid/api_cn/tensor_cn/mutiply_cn.rst b/doc/fluid/api_cn/tensor_cn/mutiply_cn.rst new file mode 100644 index 0000000000000000000000000000000000000000..6ae587b7227a313b847e9cca7ba4948cf2335f63 --- /dev/null +++ b/doc/fluid/api_cn/tensor_cn/mutiply_cn.rst @@ -0,0 +1,41 @@ +.. _cn_api_tensor_multiply: + +multiply +-------- + +.. py:function:: paddle.multiply(x, y, name=None) + +该OP是逐元素相除算子,输入 ``x`` 与输入 ``y`` 逐元素相除,并将各个位置的输出元素保存到返回结果中。 +输入 ``x`` 与输入 ``y`` 必须可以广播为相同形状, 关于广播规则,请参考 :ref:`use_guide_broadcasting` + +等式为: + +.. math:: + Out = X * Y + +- :math:`X` :多维Tensor。 +- :math:`Y` :多维Tensor。 + +参数: + - x(Tensor)- 多维Tensor。数据类型为float32 、float64、int32或int64。 + - y(Tensor)- 多维Tensor。数据类型为float32 、float64、int32或int64。 + - name(str,可选)- 操作的名称(可选,默认值为None)。更多信息请参见 :ref:`api_guide_Name`。 + + +返回: 多维 Tensor, 数据类型与 ``x`` 相同,维度为广播后的形状。 + + +**代码示例** + +.. code-block:: python + + import paddle + import numpy as np + + paddle.disable_static() + np_x = np.array([2, 3, 4]).astype('float64') + np_y = np.array([1, 5, 2]).astype('float64') + x = paddle.to_tensor(np_x) + y = paddle.to_tensor(np_y) + z = paddle.multiply(x, y) + print(z.numpy()) # [2., 0.6, 2.]