public enum OnnxJavaType extends java.lang.Enum<OnnxJavaType>
Enum Constant and Description |
---|
BOOL |
DOUBLE |
FLOAT |
INT16 |
INT32 |
INT64 |
INT8 |
STRING |
UNKNOWN |
Modifier and Type | Field and Description |
---|---|
java.lang.Class<?> |
clazz |
int |
size |
int |
value |
Modifier and Type | Method and Description |
---|---|
static OnnxJavaType |
mapFromClass(java.lang.Class<?> clazz)
Maps from a Java class object into the enum type, returning
UNKNOWN for
unsupported types. |
static OnnxJavaType |
mapFromInt(int value)
Maps from an int in native land into an OnnxJavaType instance.
|
static OnnxJavaType |
mapFromOnnxTensorType(TensorInfo.OnnxTensorType onnxValue)
Maps from the
TensorInfo.OnnxTensorType enum to the corresponding OnnxJavaType enum, converting
types as appropriate. |
static OnnxJavaType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static OnnxJavaType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OnnxJavaType FLOAT
public static final OnnxJavaType DOUBLE
public static final OnnxJavaType INT8
public static final OnnxJavaType INT16
public static final OnnxJavaType INT32
public static final OnnxJavaType INT64
public static final OnnxJavaType BOOL
public static final OnnxJavaType STRING
public static final OnnxJavaType UNKNOWN
public final int value
public final java.lang.Class<?> clazz
public final int size
public static OnnxJavaType[] values()
for (OnnxJavaType c : OnnxJavaType.values()) System.out.println(c);
public static OnnxJavaType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static OnnxJavaType mapFromInt(int value)
value
- The value to lookup.public static OnnxJavaType mapFromOnnxTensorType(TensorInfo.OnnxTensorType onnxValue)
TensorInfo.OnnxTensorType
enum to the corresponding OnnxJavaType enum, converting
types as appropriate.
Must match the values from OrtJniUtil.c.
onnxValue
- The native value type.public static OnnxJavaType mapFromClass(java.lang.Class<?> clazz)
UNKNOWN
for
unsupported types.clazz
- The class to use.