SequenceConstruct#

  • Domain: ai.onnx

  • Since version: 11

Construct a tensor sequence containing ‘inputs’ tensors. All tensors in ‘inputs’ must have the same data type.

Inputs

  • inputs (T): Tensors.

Outputs

  • output_sequence (S): Sequence enclosing the input tensors.

Type Constraints

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

  • S: Constrain output types to any tensor type. Allowed types: 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)).

Examples#

test_cc_sequence_construct

Inputs:
  a: shape=(2, 3), dtype=float32
    [[-1.  ,  0.  ,  1.5 ],
     [-2.25,  3.5 , -4.75]]
  b: shape=(2, 3), dtype=float32
    [[0., 1., 2.],
     [3., 4., 5.]]
  c: shape=(2, 3), dtype=float32
    [[ 6.,  7.,  8.],
     [ 9., 10., 11.]]

Outputs:
  output_sequence: shape=(3, 2, 3), dtype=float32
    [[[-1.  ,  0.  ,  1.5 ],
      [-2.25,  3.5 , -4.75]],

     [[ 0.  ,  1.  ,  2.  ],
      [ 3.  ,  4.  ,  5.  ]],

     [[ 6.  ,  7.  ,  8.  ],
      [ 9.  , 10.  , 11.  ]]]

test_cc_sequence_construct_int64_single

Inputs:
  a: shape=(4,), dtype=int64
    [-1,  0,  1,  2]

Outputs:
  output_sequence: shape=(1, 4), dtype=int64
    [[-1,  0,  1,  2]]