Package ai.onnxruntime
Enum Class TensorInfo.OnnxTensorType
- All Implemented Interfaces:
Serializable,Comparable<TensorInfo.OnnxTensorType>,Constable
- Enclosing class:
- TensorInfo
The native element types supported by the ONNX runtime.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA non-IEEE 16-bit floating point value with 8 exponent bits and 7 mantissa bits.A boolean value stored in a byte.A 128-bit complex number, stored as 2 64-bit values.A 64-bit complex number, stored as 2 32-bit values.An IEEE 64-bit floating point number.An IEEE 32-bit floating point number.An IEEE 16-bit floating point number.A non-IEEE 8-bit floating point format with 4 exponent bits and 3 mantissa bits, with NaN and no infinite values (FN).A non-IEEE 8-bit floating point format with 4 exponent bits and 3 mantissa bits, with NaN, no infinite values (FN) and no negative zero (UZ).A non-IEEE 8-bit floating point format with 5 exponent bits and 2 mantissa bits.A non-IEEE 8-bit floating point format with 5 exponent bits and 2 mantissa bits, with NaN, no infinite values (FN) and no negative zero (UZ).A 16-bit signed integer.A 32-bit signed integer.A 64-bit signed integer.An 8-bit signed integer.A UTF-8 string.A 16-bit unsigned integer.A 32-bit unsigned integer.A 64-bit unsigned integer.An 8-bit unsigned integer.An undefined element type. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic TensorInfo.OnnxTensorTypemapFromInt(int value) Maps from the C API's int enum to the Java enum.static TensorInfo.OnnxTensorTypemapFromJavaType(OnnxJavaType type) Maps a OnnxJavaType into the appropriate native element type.static TensorInfo.OnnxTensorTypeReturns the enum constant of this class with the specified name.static TensorInfo.OnnxTensorType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED
An undefined element type. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8
An 8-bit unsigned integer. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8
An 8-bit signed integer. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16
A 16-bit unsigned integer. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16
A 16-bit signed integer. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32
A 32-bit unsigned integer. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32
A 32-bit signed integer. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64
A 64-bit unsigned integer. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64
A 64-bit signed integer. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16
An IEEE 16-bit floating point number. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT
An IEEE 32-bit floating point number. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE
An IEEE 64-bit floating point number. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING
A UTF-8 string. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL
A boolean value stored in a byte. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64
A 64-bit complex number, stored as 2 32-bit values. Not accessible from Java. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128
A 128-bit complex number, stored as 2 64-bit values. Not accessible from Java. -
ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16
A non-IEEE 16-bit floating point value with 8 exponent bits and 7 mantissa bits.See Bfloat16 on Wikipedia for more details.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN
A non-IEEE 8-bit floating point format with 4 exponent bits and 3 mantissa bits, with NaN and no infinite values (FN).See the float 8 ONNX standard for details.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ
A non-IEEE 8-bit floating point format with 4 exponent bits and 3 mantissa bits, with NaN, no infinite values (FN) and no negative zero (UZ).See the float 8 ONNX standard for details.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2
A non-IEEE 8-bit floating point format with 5 exponent bits and 2 mantissa bits.See the float 8 ONNX standard for details.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ
A non-IEEE 8-bit floating point format with 5 exponent bits and 2 mantissa bits, with NaN, no infinite values (FN) and no negative zero (UZ).See the float 8 ONNX standard for details.
-
-
Field Details
-
value
public final int valueThe int id on the native side.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
mapFromInt
Maps from the C API's int enum to the Java enum.- Parameters:
value- The index of the Java enum.- Returns:
- The Java enum.
-
mapFromJavaType
Maps a OnnxJavaType into the appropriate native element type.- Parameters:
type- The type of the Java input/output.- Returns:
- The native element type.
-