---
title: ScatterElements
description: "根据updates和indices来更新data的值，并把结果返回。与Scatter不同的是它提供了更精细的控制，允许指定要更新的元素在维度上的具体位置。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/aolapi/atlasoxol_09_0139.html
sourcePath: /source/zh/canncommercial/900/API/aolapi/atlasoxol_09_0139.html
indexId: 7e13610214c8e3556f1aa5890a4a83f7007722ce3eda9eeb98d3cc10f192d91763
---
# ScatterElements

#### 功能

根据updates和indices来更新data的值，并把结果返回。与Scatter不同的是它提供了更精细的控制，允许指定要更新的元素在维度上的具体位置。


#### 输入

- data： 输入Tensor，数据类型：float16、float、int32。
- indices：Tensor，数据类型：int32、int64。shape维度与输入data一致。
- updates：Tensor，数据类型：float16、float、int32。shape与indices维度一致。


#### 输出

y：Tensor，和输入data的shape、数据类型一致。


#### 属性

axis：int，默认是0，表示沿axis取数据。


#### 支持的ONNX版本

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