2021-12-07 12:17:56 +08:00
|
|
|
|
mindspore.ops.Gather
|
|
|
|
|
|
======================
|
|
|
|
|
|
|
2022-11-19 10:12:44 +08:00
|
|
|
|
.. py:class:: mindspore.ops.Gather
|
2021-12-07 12:17:56 +08:00
|
|
|
|
|
|
|
|
|
|
返回输入Tensor在指定 `axis` 上 `input_indices` 索引对应的元素组成的切片。
|
|
|
|
|
|
|
2022-01-15 15:11:52 +08:00
|
|
|
|
下图展示了Gather常用的计算过程:
|
|
|
|
|
|
|
2022-01-25 16:00:34 +08:00
|
|
|
|
.. image:: Gather.png
|
2022-01-15 15:11:52 +08:00
|
|
|
|
|
2022-01-25 16:41:47 +08:00
|
|
|
|
其中,params代表输入 `input_params` ,indices代表要切片的索引 `input_indices` 。
|
2022-01-15 15:11:52 +08:00
|
|
|
|
|
2022-04-16 17:16:29 +08:00
|
|
|
|
更多参考详见 :func:`mindspore.ops.gather`。
|