(l-onnx-doc-Split)= # Split (l-onnx-op-split-18)= ## Split - 18 ### Version - **name**: [Split (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Split) - **domain**: `main` - **since_version**: `18` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 18**. ### Summary Split a tensor into a list of tensors, along the specified 'axis'. Either input 'split' or the attribute 'num_outputs' should be specified, but not both. If the attribute 'num_outputs' is specified, then the tensor is split into equal sized parts. If the tensor is not evenly splittable into `num_outputs`, the last chunk will be smaller. If the input 'split' is specified, it indicates the sizes of each output in the split. ### Attributes * **axis - INT** (default is `'0'`): Which axis to split on. A negative value means counting dimensions from the back. Accepted range is [-rank, rank-1] where r = rank(input). * **num_outputs - INT** : Number of outputs to split parts of the tensor into. If the tensor is not evenly splittable the last chunk will be smaller. ### Inputs Between 1 and 2 inputs. - **input** (heterogeneous) - **T**: The tensor to split - **split** (optional, heterogeneous) - **tensor(int64)**: Optional length of each output. Values should be >= 0.Sum of the values must be equal to the dim value at 'axis' specified. ### Outputs Between 1 and 2147483647 outputs. - **outputs** (variadic, heterogeneous) - **T**: One or more outputs forming list of tensors after splitting ### 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 all tensor types. ```{toctree} text_diff_Split_13_18 ``` (l-onnx-op-split-13)= ## Split - 13 ### Version - **name**: [Split (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Split) - **domain**: `main` - **since_version**: `13` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 13**. ### Summary Split a tensor into a list of tensors, along the specified 'axis'. Lengths of the parts can be specified using input 'split'. Otherwise, the tensor is split to equal sized parts. ### Attributes * **axis - INT** (default is `'0'`): Which axis to split on. A negative value means counting dimensions from the back. Accepted range is [-rank, rank-1] where r = rank(input). ### Inputs Between 1 and 2 inputs. - **input** (heterogeneous) - **T**: The tensor to split - **split** (optional, heterogeneous) - **tensor(int64)**: Optional length of each output. Values should be >= 0.Sum of the values must be equal to the dim value at 'axis' specified. ### Outputs Between 1 and 2147483647 outputs. - **outputs** (variadic, heterogeneous) - **T**: One or more outputs forming list of tensors after splitting ### 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 all tensor types. ```{toctree} text_diff_Split_11_18 text_diff_Split_11_13 ``` (l-onnx-op-split-11)= ## Split - 11 ### Version - **name**: [Split (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Split) - **domain**: `main` - **since_version**: `11` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 11**. ### Summary Split a tensor into a list of tensors, along the specified 'axis'. Lengths of the parts can be specified using argument 'split'. Otherwise, the tensor is split to equal sized parts. ### Attributes * **axis - INT** (default is `'0'`): Which axis to split on. A negative value means counting dimensions from the back. Accepted range is [-rank, rank-1] where r = rank(input). * **split - INTS** : length of each output. Values should be >= 0. ### Inputs - **input** (heterogeneous) - **T**: The tensor to split ### Outputs Between 1 and 2147483647 outputs. - **outputs** (variadic, heterogeneous) - **T**: One or more outputs forming list 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 and output types to all tensor types. ```{toctree} text_diff_Split_2_18 text_diff_Split_2_13 text_diff_Split_2_11 ``` (l-onnx-op-split-2)= ## Split - 2 ### Version - **name**: [Split (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Split) - **domain**: `main` - **since_version**: `2` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 2**. ### Summary Split a tensor into a list of tensors, along the specified 'axis'. Lengths of the parts can be specified using argument 'split'. Otherwise, the tensor is split to equal sized parts. ### Attributes * **axis - INT** (default is `'0'`): Which axis to split on. * **split - INTS** : length of each output ### Inputs - **input** (heterogeneous) - **T**: The tensor to split ### Outputs Between 1 and 2147483647 outputs. - **outputs** (variadic, heterogeneous) - **T**: One or more outputs forming list 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 and output types to all tensor types. ```{toctree} text_diff_Split_1_18 text_diff_Split_1_13 text_diff_Split_1_11 text_diff_Split_1_2 ``` (l-onnx-op-split-1)= ## Split - 1 ### Version - **name**: [Split (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Split) - **domain**: `main` - **since_version**: `1` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `False` This version of the operator has been available **since version 1**. ### Summary Split a tensor into a list of tensors, along the specified 'axis'. The lengths of the split can be specified using argument 'axis' or optional second input blob to the operator. Otherwise, the tensor is split to equal sized parts. ### Attributes * **axis - INT** : Which axis to split on * **split - INTS** : length of each output ### Inputs Between 1 and 2 inputs. - **input** (heterogeneous) - **T**: The tensor to split - **split** (optional, heterogeneous) - **T**: Optional list of output lengths (see also arg 'split') ### Outputs Between 1 and 2147483647 outputs. - **outputs...** (variadic, heterogeneous) - **T**: One or more outputs forming list of tensors after splitting ### Type Constraints * **T** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)` ): Constrain input types to float tensors.