Versioned name: GatherElements-6
Category: Data movement operations
Short description: GatherElements takes elements from the input data
tensor at positions specified in the indices
tensor.
Detailed description GatherElements takes elements from the data
tensor at positions specified in the indices
tensor. The data
and indices
tensors have the same rank r >= 1
. Optional attribute axis
determines along which axis elements with indices specified in indices
are taken. The indices
tensor has the same shape as the data
tensor except for the axis
dimension. Output consists of values (gathered from the data
tensor) for each element in the indices
tensor and has the same shape as indices
.
For instance, in the 3D case (r = 3
), the output is determined by the following equations:
Example 1 with concrete values:
Example 2 with axis
= 1 and indices
having greater (than data
) shape:
Example 3 indices
has lesser (than data
) shape:
Attributes:
[-r, r-1]
where r = rank(data)
.Inputs:
rank >= 1
. Required.[0, s-1]
, where s
is size along axis
dimension of the data
tensor. Required.Outputs:
indices
.Types
int32
or int64
.Example