Enum Class ElementType

All Implemented Interfaces:
Serializable, Comparable<ElementType>, Constable

public enum ElementType extends Enum<ElementType>
The data type of individual tensor elements, corresponding to ONNXTensorElementDataType in the ONNX Runtime C API.
  • Enum Constant Details

    • UNDEFINED

      public static final ElementType UNDEFINED
      Undefined type.
    • FLOAT

      public static final ElementType FLOAT
      32-bit floating point.
    • UINT8

      public static final ElementType UINT8
      Unsigned 8-bit integer.
    • INT8

      public static final ElementType INT8
      Signed 8-bit integer.
    • UINT16

      public static final ElementType UINT16
      Unsigned 16-bit integer.
    • INT16

      public static final ElementType INT16
      Signed 16-bit integer.
    • INT32

      public static final ElementType INT32
      Signed 32-bit integer.
    • INT64

      public static final ElementType INT64
      Signed 64-bit integer.
    • STRING

      public static final ElementType STRING
      String.
    • BOOL

      public static final ElementType BOOL
      Boolean.
    • FLOAT16

      public static final ElementType FLOAT16
      16-bit floating point (IEEE 754).
    • DOUBLE

      public static final ElementType DOUBLE
      64-bit floating point.
    • UINT32

      public static final ElementType UINT32
      Unsigned 32-bit integer.
    • UINT64

      public static final ElementType UINT64
      Unsigned 64-bit integer.
    • COMPLEX64

      public static final ElementType COMPLEX64
      64-bit complex number (real + imaginary float).
    • COMPLEX128

      public static final ElementType COMPLEX128
      128-bit complex number (real + imaginary double).
    • BFLOAT16

      public static final ElementType BFLOAT16
      16-bit brain floating point (bfloat16).
    • FLOAT8E4M3FN

      public static final ElementType FLOAT8E4M3FN
      8-bit floating point E4M3FN.
    • FLOAT8E4M3FNUZ

      public static final ElementType FLOAT8E4M3FNUZ
      8-bit floating point E4M3FNUZ.
    • FLOAT8E5M2

      public static final ElementType FLOAT8E5M2
      8-bit floating point E5M2.
    • FLOAT8E5M2FNUZ

      public static final ElementType FLOAT8E5M2FNUZ
      8-bit floating point E5M2FNUZ.
    • UINT4

      public static final ElementType UINT4
      4-bit unsigned integer.
    • INT4

      public static final ElementType INT4
      4-bit signed integer.
  • Method Details

    • values

      public static ElementType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ElementType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • value

      public int value()
      Returns the ORT integer code.
      Returns:
      the ORT integer code.
    • of

      public static ElementType of(int value)
      Returns the ElementType corresponding to the given ORT integer code.
      Parameters:
      value - the ORT integer code.
      Returns:
      the ElementType.
    • javaType

      public Class<?> javaType()
      Returns the Java type associated with this element type, or null for types without a direct Java primitive mapping.
      Returns:
      the Java class, or null.