mindspore/docs/api/api_python/ops/mindspore.ops.SparseTensorD...

20 lines
916 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.SparseTensorDenseAdd
==================================
.. py:class:: mindspore.ops.SparseTensorDenseAdd
一个稀疏张量加上稠密张量得到一个稠密张量。
输入:
- **x1_indices** (Tensor) - 二维张量表示稀疏张量的索引位置shape为 :math:`(n, 2)`
- **x1_values** (Tensor) - 一维张量表示稀疏张量索引位置对应值shape为 :math:`(n,)`
- **x1_shape** (tuple(int)) - 稀疏张量对应的稠密张量维度shape为 :math:`(N, C)`
- **x2** (Tensor) - 稠密张量,数据类型与稀疏张量一致。
输出:
张量shape与 `x1_shape` 一致。
异常:
- **TypeError** - `x1_indices``x1_shape` 不是int32或者int64。
- **ValueError** - `x1_shape` 的shape `x1_indices` 的shape `x1_values` 的shape和 `x2` 的shape不满足参数描述。