You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.ops.AddN.rst 731 B

4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021
  1. mindspore.ops.AddN
  2. ===================
  3. .. py:class:: mindspore.ops.AddN()
  4. 逐元素将所有输入的Tensor相加。
  5. 所有输入Tensor必须具有相同的shape。
  6. **输入:**
  7. - **x** (Union(tuple[Tensor], list[Tensor])) - Tensor组成的tuble或list,类型为 `bool_ <https://www.mindspore.cn/docs/api/zh-CN/master/api_python/mindspore.html#mindspore.dtype>`_ 或 `number <https://www.mindspore.cn/docs/api/zh-CN/master/api_python/mindspore.html#mindspore.dtype>`_ 。
  8. **输出:**
  9. Tensor,与 `x` 的每个Tensor具有相同的shape和数据类型。
  10. **异常:**
  11. - **TypeError** - `x` 既不是tuple,也不是list。
  12. - **ValueError** - `x` 中存在shape不同的Tensor。