未验证 提交 b258caf4 编写于 作者: S Steffy-zxf 提交者: GitHub

fix add_n doc (eng) (#28464)

fix the add_n english doc
上级 543ff333
...@@ -717,37 +717,41 @@ def sum(x, axis=None, dtype=None, keepdim=False, name=None): ...@@ -717,37 +717,41 @@ def sum(x, axis=None, dtype=None, keepdim=False, name=None):
@templatedoc(op_type="sum") @templatedoc(op_type="sum")
def add_n(inputs, name=None): def add_n(inputs, name=None):
""" """
${comment} This OP is used to sum one or more Tensor of the input.
Case 1: For example:
::
Input: .. code-block:: text
Input. Shape = [2, 3]
Input = [[1, 2, 3], Case 1:
[4, 5, 6]]
Input:
Output: input.shape = [2, 3]
The output. Shape = [2, 3] input = [[1, 2, 3],
Output = [[1, 2, 3], [4, 5, 6]]
[4, 5, 6]]
Output:
Case 2: output.shape = [2, 3]
:: output = [[1, 2, 3],
Input: [4, 5, 6]]
First input:
Input1. Shape = [2, 3] Case 2:
Input1 = [[1, 2, 3],
[4, 5, 6]] Input:
First input:
The second input: input1.shape = [2, 3]
Input2. Shape = [2, 3] Input1 = [[1, 2, 3],
Input2 = [[7, 8, 9], [4, 5, 6]]
[10, 11, 12]]
The second input:
Output: input2.shape = [2, 3]
The output. Shape = [2, 3] input2 = [[7, 8, 9],
Output = [[8, 10, 12], [10, 11, 12]]
[14, 16, 18]]
Output:
output.shape = [2, 3]
output = [[8, 10, 12],
[14, 16, 18]]
Args: Args:
inputs (Tensor|list(Tensor)): A Tensor list. The shape and data type of the list elements should be consistent. inputs (Tensor|list(Tensor)): A Tensor list. The shape and data type of the list elements should be consistent.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册