---
title: GatherElements
description: "获取输入Tensor indices产生的索引，确定输入Tensor input的元素生成对应输入Tensor indices的位置的输出Tensor output。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/aolapi/atlasoxol_09_0063.html
sourcePath: /source/zh/canncommercial/900/API/aolapi/atlasoxol_09_0063.html
indexId: b6ac20c57ed0e8b4c436f3dccc848ed4bef0209e7bcd06498625c44f2413b07863
---
# GatherElements

#### 功能

获取输入Tensor indices产生的索引，确定输入Tensor input的元素生成对应输入Tensor indices的位置的输出Tensor output。


#### 输入

- input：输入Tensor，秩r≥1，数据类型：float16、float、int32。
- indices：输入Tensor，索引Tensor与输入input具有相同的秩r，数据类型：int32、int64。


#### 属性

axis：数据类型支持int，默认为0， 指定聚集的轴，负数表示从后面计算维度。


#### 输出

output：输出Tensor，与indices的shape相同。


#### 约束与限制

无。


#### 支持的ONNX版本

Opset v11/v12/v13/v14/v15/v16/v17/v18
