# TensorInfo.OnnxTensorType (onnxruntime 1.15.0 API)

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
`ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8`
`ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED`

### Field Summary

Fields
`int` `value` The int id on the native side.

### Method Summary

All Methods Static Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128

#### ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16

    public static final TensorInfo.OnnxTensorType ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16

### Field Detail

#### value

    public final int value

The int id on the native side.

### 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 name
  `java.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.