Split - version 2#

This page documents version 2 of operator Split. See Split for the latest version (since version 18).

  • Domain: ai.onnx

  • Since version: 2

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.

Inputs

  • input (T): The tensor to split

Outputs

Between 1 and ∞ outputs.

  • outputs (T): One or more outputs forming list of tensors after splitting

Attributes

  • axis (int): Which axis to split on.

  • split (int[]): length of each output. Values should be >= 0.

Type Constraints

  • T: Constrain input and output types to all tensor types. Allowed types: 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).

Differences with previous version (1)#

SchemaDiff: Split (domain 'ai.onnx')

  • old version: 1

  • new version: 2

  • breaking: yes

Breaking reasons:

  • input ‘split’ (removed): was at position 1

  • output ‘outputs…’ (removed): was at position 0

  • output ‘outputs’ (added): at position 0; option=Single; type_str=’T’

  • attribute ‘axis’ (changed): default value changed UNDEFINED -> 0

Inputs:

  • [BREAKING] removed ‘split’: was at position 1

Outputs:

  • [BREAKING] removed ‘outputs…’: was at position 0

  • [BREAKING] added ‘outputs’: at position 0; option=Single; type_str=’T’

Attributes:

  • [BREAKING] changed ‘axis’: default value changed UNDEFINED -> 0

Type constraints:

  • changed ‘T’: added types: [‘tensor(bool)’, ‘tensor(complex128)’, ‘tensor(complex64)’, ‘tensor(int16)’, ‘tensor(int32)’, ‘tensor(int64)’, ‘tensor(int8)’, ‘tensor(string)’, ‘tensor(uint16)’, ‘tensor(uint32)’, ‘tensor(uint64)’, ‘tensor(uint8)’]

Documentation:

  • line similarity: 0.29 (+2/-3 lines)

--- Split v1
+++ Split v2
@@ -1,4 +1,3 @@
 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.
+'axis'. Lengths of the parts can be specified using argument 'split'.
+Otherwise, the tensor is split to equal sized parts.