Package ai.onnxruntime
Enum TensorInfo.OnnxTensorType
- java.lang.Object
-
- java.lang.Enum<TensorInfo.OnnxTensorType>
-
- ai.onnxruntime.TensorInfo.OnnxTensorType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TensorInfo.OnnxTensorType>
- Enclosing class:
- TensorInfo
public static enum TensorInfo.OnnxTensorType extends java.lang.Enum<TensorInfo.OnnxTensorType>
The native element types supported by the ONNX runtime.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16
A non-IEEE 16-bit floating point value with 8 exponent bits and 7 mantissa bits.ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL
A boolean value stored in a byte.ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128
A 128-bit complex number, stored as 2 64-bit values.ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64
A 64-bit complex number, stored as 2 32-bit values.ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE
An IEEE 64-bit floating point number.ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT
An IEEE 32-bit floating point number.ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16
An IEEE 16-bit floating point number.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).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).ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2
A non-IEEE 8-bit floating point format with 5 exponent bits and 2 mantissa bits.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).ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16
A 16-bit signed integer.ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32
A 32-bit signed integer.ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64
A 64-bit signed integer.ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8
An 8-bit signed integer.ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING
A UTF-8 string.ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16
A 16-bit unsigned integer.ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32
A 32-bit unsigned integer.ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64
A 64-bit unsigned integer.ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8
An 8-bit unsigned integer.ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED
An undefined element type.
-
Field Summary
Fields Modifier and Type Field Description int
value
The int id on the native side.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TensorInfo.OnnxTensorType
mapFromInt(int value)
Maps from the C API's int enum to the Java enum.static TensorInfo.OnnxTensorType
mapFromJavaType(OnnxJavaType type)
Maps a OnnxJavaType into the appropriate native element type.static TensorInfo.OnnxTensorType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TensorInfo.OnnxTensorType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED
An undefined element type.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8
An 8-bit unsigned integer.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8
An 8-bit signed integer.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16
A 16-bit unsigned integer.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16
A 16-bit signed integer.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32
A 32-bit unsigned integer.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32
A 32-bit signed integer.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64
A 64-bit unsigned integer.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64
A 64-bit signed integer.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16
An IEEE 16-bit floating point number.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT
An IEEE 32-bit floating point number.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE
An IEEE 64-bit floating point number.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING
A UTF-8 string.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL
public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL
A boolean value stored in a byte.
-
ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64
public static final TensorInfo.OnnxTensorType 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
public static final TensorInfo.OnnxTensorType 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
public static final TensorInfo.OnnxTensorType 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
public static final TensorInfo.OnnxTensorType 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
public static final TensorInfo.OnnxTensorType 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
public static final TensorInfo.OnnxTensorType 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
public static final TensorInfo.OnnxTensorType 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.
-
-
Method Detail
-
values
public static TensorInfo.OnnxTensorType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TensorInfo.OnnxTensorType c : TensorInfo.OnnxTensorType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TensorInfo.OnnxTensorType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
mapFromInt
public static TensorInfo.OnnxTensorType mapFromInt(int value)
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
public static TensorInfo.OnnxTensorType mapFromJavaType(OnnxJavaType type)
Maps a OnnxJavaType into the appropriate native element type.- Parameters:
type
- The type of the Java input/output.- Returns:
- The native element type.
-
-