Versioned name: ScatterNDUpdate-3
Category: Data movement operations
Short description: Creates a copy of the first input tensor with updated elements specified with second and third input tensors. This is similar to Reference
Detailed description: The operation produces a copy of data
tensor and updates its value to values specified by updates
at specific index positions specified by indices
. The output shape is the same as the shape of data
. indices
tensor must not have duplicate entries. In case duplicate entries in indices
the result is undefined.
The last dimension of indices
can be at most the rank of data.shape
. The last dimension of indices
corresponds to indices into elements if indices.shape[-1]
= data.shape.rank
or slices if indices.shape[-1]
< data.shape.rank
. updates
is a tensor with shape indices.shape[:-1] + data.shape[indices.shape[-1]:]
Example 1 that shows update of four single elements in data
:
Example 2 that shows update of two slices of 4x4
shape in data
:
Attributes: ScatterNDUpdate does not have attributes.
Inputs:
data
tensor of arbitrary rank r
>= 1 and of type T. Required.indices
tensor with indices of arbitrary rank q
>= 1 and of type T_IND. All index values i_j
in index entry (i_0, i_1, ...,i_k)
(where k = indices.shape[-1]
) must be within bounds [0, s_j - 1]
where s_j = data.shape[j]
. k
must be at most r
. Required.updates
tensor of rank r - indices.shape[-1] + q - 1
of type T. Required.Outputs:
data
tensor of the type T.Types
Example