Enum Class OnnxType

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

public enum OnnxType extends Enum<OnnxType>
The type of an ONNX value, corresponding to ONNXType in the ONNX Runtime C API.
  • Enum Constant Details

    • UNKNOWN

      public static final OnnxType UNKNOWN
      Unknown type.
    • TENSOR

      public static final OnnxType TENSOR
      Dense tensor.
    • SEQUENCE

      public static final OnnxType SEQUENCE
      Sequence of values.
    • MAP

      public static final OnnxType MAP
      Map (key-value pairs).
    • OPAQUE

      public static final OnnxType OPAQUE
      Opaque type.
    • SPARSE_TENSOR

      public static final OnnxType SPARSE_TENSOR
      Sparse tensor.
    • OPTIONAL

      public static final OnnxType OPTIONAL
      Optional value.
  • Method Details

    • values

      public static OnnxType[] 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 OnnxType 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 OnnxType of(int value)
      Returns the OnnxType corresponding to the given ORT integer code.
      Parameters:
      value - the ORT integer code.
      Returns:
      the OnnxType.