Welcome to our Support Center

SequenceInsert

Description

Outputs a tensor sequence that inserts ‘tensor’ into ‘input_sequence’ at ‘position’. ‘tensor’ must have the same data type as ‘input_sequence’. Accepted range for ‘position’ is in [-n, n], where n is the number of tensors in ‘input_sequence’. Negative value means counting positions from the back. ‘position’ is optional, by default it inserts ‘tensor’ to the back of ‘input_sequence’.

 

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_sequence (heterogeneous) – S : object, input sequence.
tensor (heterogeneous) – T : object, input tensor to be inserted into the input sequence.
position (optional, heterogeneous) – I : object, position in the sequence where the new tensor is inserted. It is optional and default is to insert to the back of the sequence. Negative value means counting positions from the back. Accepted range in [-n, n], where n is the number of tensors in ‘input_sequence’. It is an error if any of the index values are out of bounds. It must be a scalar(tensor of empty shape).

 Parameters : cluster,

 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_sequence (heterogeneous) – S : object, output sequence that contains the inserted tensor at given position.

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)) : Constrain to any tensor type.

S in (seq(tensor(bool))seq(tensor(complex128))seq(tensor(complex64))seq(tensor(double))seq(tensor(float))
seq(tensor(float16))seq(tensor(int16))seq(tensor(int32))seq(tensor(int64))seq(tensor(int8))seq(tensor(string))seq(tensor(uint16))seq(tensor(uint32))seq(tensor(uint64))seq(tensor(uint8))) : Constrain to any tensor type.

I in (tensor(int32)tensor(int64)) : Constrain position to integral tensor. It must be a scalar(tensor of empty shape).

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