mindspore/docs/api/api_python/ops/mindspore.ops.SparseGatherV...

19 lines
645 B
ReStructuredText
Raw Normal View History

2022-05-29 11:14:01 +08:00
mindspore.ops.SparseGatherV2
============================
.. py:class:: mindspore.ops.SparseGatherV2
基于指定的索引和axis返回输入Tensor的切片。
2022-07-22 11:20:32 +08:00
输入:
- **input_params** (Tensor) - 被切片的Tensor。shape :math:`(x_1, x_2, ..., x_R)`
- **input_indices** (Tensor)- shape :math:`(y_1, y_2, ..., y_S)`
指定切片的索引,取值须在 `[0, input_params.shape[axis])` 范围内。
- **axis** (int) - 进行索引的axis。
2022-06-21 17:02:52 +08:00
2022-07-22 11:20:32 +08:00
输出:
Tensorshape :math:`(z_1, z_2, ..., z_N)`
2022-05-29 11:14:01 +08:00
2022-07-22 11:20:32 +08:00
异常:
- **TypeError** - `axis` 不是int类型。