OneHot#

OneHot - 9#

Version

  • name: OneHot (GitHub)

  • domain: main

  • since_version: 9

  • function:

  • support_level: SupportType.COMMON

  • shape inference: True

This version of the operator has been available since version 9.

Summary

Attributes

  • axis - INT : (Optional) Axis along which one-hot representation in added. Default: axis=-1. axis=-1 means that the additional dimension will be inserted as the innermost/last dimension in the output tensor.

Inputs

  • indices (heterogeneous) - T1:

  • depth (heterogeneous) - T2:

  • values (heterogeneous) - T3:

Outputs

  • output (heterogeneous) - T3:

Type Constraints

  • T1 in ( tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) ): Constrain input to only numeric types.

  • T2 in ( tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) ): Constrain input to only numeric types.

  • T3 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 to any tensor type.