mindspore/docs/api/api_python/ops/mindspore.ops.AccumulateNV2...

19 lines
896 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.AccumulateNV2
===========================
.. py:class:: mindspore.ops.AccumulateNV2
逐元素计算输入Tensor的累积。
AccumulateNV2与AddN类似但它们之间有一个显著的区别AccumulateNV2不会等待其所有输入就绪后再求和。也就是说不同时刻的输入会存储在内存中AccumulateNV2能够节省内存因为最小临时存储与输出大小成正比而不是输入大小。
输入:
- **x** (Union(tuple[Tensor], list[Tensor])) - AccumulateNV2的输入由多个Tensor组成的tuple或list其数据类型为数值型且每个元素的shape必须相等。
输出:
Tensor数据类型和shape与输入 `x` 的每个条目相同。
异常:
- **TypeError** - 如果 `x` 既不是tuple也不是list。
- **ValueError** - 如果 `x` 的元素的shape不相同。