Welcome to our Support Center

GatherElements

Description

GatherElements takes two inputs data and indices of the same rank r >= 1 and an optional attribute axis that identifies an axis of data (by default, the outer-most axis, that is axis 0). It 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. Its output shape is the same as the shape of indices and consists of one value (gathered from the data) for each element in indices.

 

 

Input parameters

 

specified_outputs_namearray, this parameter lets you manually assign custom names to the output tensors of a node.

 Graphs in : cluster, ONNX model architecture.

 data (heterogeneous) – T : object, tensor of rank r >= 1.
 indices (heterogeneous) – Tind : object, tensor of int32/int64 indices, with the same rank r as the input. All index values are expected to be within bounds [-s, s-1] along axis of size s. It is an error if any of the index values are out of bounds.

 Parameters : cluster,

axis : integer, which axis to gather on. Negative value means counting dimensions from the back. Accepted range is [-r, r-1] where r = rank(data).
Default value “0”.
 training? : boolean, whether the layer is in training mode (can store data for backward).
Default value “True”.
 lda coeff : float, defines the coefficient by which the loss derivative will be multiplied before being sent to the previous layer (since during the backward run we go backwards).
Default value “1”.

 name (optional) : string, name of the node.

Output parameters

 

 output (heterogeneous) – T : object, tensor of the same shape as indices.

Type Constraints

T in (tensor(bfloat16)tensor(bool)tensor(complex128)tensor(complex64)tensor(double)tensor(float)tensor(float16)
tensor(int16)tensor(int32)tensor(int64)tensor(int8)tensor(string)tensor(uint16)tensor(uint32)tensor(uint64)tensor(uint8)) : Constrain input and output types to any tensor type.

Tind in (tensor(int32)tensor(int64)) : Constrain indices to integer types

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).
Table of Contents