Identity - version 14#

This page documents version 14 of operator Identity. See Identity for the latest version (since version 25).

  • Domain: ai.onnx

  • Since version: 14

Identity operator

Inputs

  • input (V): Input tensor

Outputs

  • output (V): Tensor to copy input into.

Type Constraints

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

Examples#

test_cc_identity_sequence

Node:
  Identity(seq) -> (seq_out)
Inputs:
  seq: shape=(1, 2, 2), dtype=float32
    [[[1., 2.],
      [3., 4.]]]
  input_1: shape=(1, 2, 2), dtype=float32
    [[[2., 3.],
      [1., 5.]]]

Outputs:
  seq_out: shape=(2, 1, 2, 2), dtype=float32
    [[[[1., 2.],
       [3., 4.]]],


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

Differences with previous version (13)#

SchemaDiff: Identity (domain 'ai.onnx')

  • old version: 13

  • new version: 14

  • breaking: yes

Breaking reasons:

  • input ‘input’ (changed): type_str changed ‘T’ -> ‘V’

  • output ‘output’ (changed): type_str changed ‘T’ -> ‘V’

  • type constraint ‘T’ (removed): entire constraint removed

Inputs:

  • [BREAKING] changed ‘input’: type_str changed ‘T’ -> ‘V’

Outputs:

  • [BREAKING] changed ‘output’: type_str changed ‘T’ -> ‘V’

Type constraints:

  • [BREAKING] removed ‘T’: entire constraint removed

  • added ‘V’: added 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))’, ‘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)’]