tensor.gather_elements
GatherElements is an indexing operation that produces its output by indexing into the input data tensor at index positions determined by elements of the indices tensor.
Args
self
(@Tensor<T>
) - The input tensor.indices
(Tensor<i32>
) - Tensor of indices.axis
(Option<i32>
) - Axis to gather_elements on. Default: axis=0.
Panics
Panics if index values are not within bounds [-s, s-1] along axis of size s.
Returns
A new Tensor<T>
.
Example
Last updated