Welcome to our Support Center

SplitToSequence

Description

Split a tensor into a sequence of tensors, along the specified ‘axis’. Lengths of the parts can be specified using the optional argument ‘split’. If the argument split' is not specified, a default scalar value of 1 is used as the value of split’. ‘split’ must contain only positive numbers. ‘split’ is either a scalar (tensor of empty shape), or a 1-D tensor. If ‘split’ is a scalar, then ‘input’ will be split into chunks all of size ‘split’ if possible. The last chunk alone may be smaller than ‘split’ if the ‘input’ size along the given axis ‘axis’ is not divisible by ‘split’. If ‘split’ is a 1-dimensional tensor, the input tensor is split into ‘size(split)’ chunks, with lengths of the parts on ‘axis’ specified in ‘split’. In this scenario, the sum of entries in ‘split’ must be equal to the dimension size of input tensor on ‘axis’.

 

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, the tensor to split.
split (optional, heterogeneous) – I : object, length of each output. It can be either a scalar(tensor of empty shape), or a 1-D tensor. All values must be >= 0.

 Parameters : cluster,

axis: integer, which axis to split on. A negative value means counting dimensions from the back. Accepted range is [-rank, rank-1].
Default value “0”.
keepdims : boolean, keep the split dimension or not. True, which means we keep split dimension. If input ‘split’ is specified, this attribute is ignored.
Default value “True”.
 training? : boolean, whether B should be transposed on the last two dimensions before doing multiplication.
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, one or more outputs forming a sequence of tensors after splitting.

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 input types to all tensor types.

I in (tensor(int32)tensor(int64)) : Constrain split size to integral tensor.

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 output types to all tensor 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