Welcome to our Support Center

ReverseSequence

Description

Reverse batch of sequences having different lengths specified by sequence_lens. For each slice i iterating on batch axis, the operator reverses the first sequence_lens[i] elements on time axis, and copies elements whose index’s beyond sequence_lens[i] to the output. So the output slice i contains reversed sequences on the first sequence_lens[i] elements, then have original values copied for the other elements.

 

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.

input (heterogeneous) – T : object, tensor of rank r >= 2.
sequence_lens (heterogeneous) – tensor(int64) : object, tensor specifying lengths of the sequences in a batch. It has shape [batch_size].

 Parameters : cluster,

batch_axis : integer, specify which axis is batch axis. Must be one of 1, or 0.
Default value “1”.
time_axis : integer, specify which axis is time axis. Must be one of 0, or 1.
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

Y (heterogeneous) – T : object, tensor with same shape of input.

Type Constraints

T in (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)) : Input and output types can be of any tensor type.

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