Package ai.konduit.serving.model
Enum TensorDataType
- java.lang.Object
-
- java.lang.Enum<TensorDataType>
-
- ai.konduit.serving.model.TensorDataType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<TensorDataType>
@Deprecated public enum TensorDataType extends java.lang.Enum<TensorDataType>
Deprecated.To be removed - see https://github.com/KonduitAI/konduit-serving/issues/298Possible data types for tensors. Comes with conversions from TensorFlow and Python and between ND4J types.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BFLOAT16Deprecated.BOOLDeprecated.COMPLEX128Deprecated.COMPLEX64Deprecated.DOUBLEDeprecated.FLOATDeprecated.HALFDeprecated.INT16Deprecated.INT32Deprecated.INT64Deprecated.INT8Deprecated.INVALIDDeprecated.QINT16Deprecated.QINT32Deprecated.QINT8Deprecated.QUINT16Deprecated.QUINT8Deprecated.RESOURCEDeprecated.STRINGDeprecated.UINT16Deprecated.UINT32Deprecated.UINT64Deprecated.UINT8Deprecated.VARIANTDeprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TensorDataTypefromNd4jType(org.nd4j.linalg.api.buffer.DataType dataType)Deprecated.static TensorDataTypefromNd4jType(org.nd4j.linalg.api.ndarray.INDArray array)Deprecated.static TensorDataTypefromProtoValue(java.lang.String value)Deprecated.Map a tensor data type to a proto value found in tensorflow.static org.nd4j.linalg.api.buffer.DataTypetoNd4jType(TensorDataType tensorDataType)Deprecated.static java.lang.StringtoPythonName(TensorDataType tensorDataType)Deprecated.Get the python name for the given data typeorg.nd4j.tensorflow.conversion.TensorDataTypetoTFType()Deprecated.static TensorDataTypevalueOf(java.lang.String name)Deprecated.Returns the enum constant of this type with the specified name.static TensorDataType[]values()Deprecated.Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INVALID
public static final TensorDataType INVALID
Deprecated.
-
FLOAT
public static final TensorDataType FLOAT
Deprecated.
-
DOUBLE
public static final TensorDataType DOUBLE
Deprecated.
-
INT32
public static final TensorDataType INT32
Deprecated.
-
UINT8
public static final TensorDataType UINT8
Deprecated.
-
INT16
public static final TensorDataType INT16
Deprecated.
-
INT8
public static final TensorDataType INT8
Deprecated.
-
STRING
public static final TensorDataType STRING
Deprecated.
-
COMPLEX64
public static final TensorDataType COMPLEX64
Deprecated.
-
INT64
public static final TensorDataType INT64
Deprecated.
-
BOOL
public static final TensorDataType BOOL
Deprecated.
-
QINT8
public static final TensorDataType QINT8
Deprecated.
-
QUINT8
public static final TensorDataType QUINT8
Deprecated.
-
QINT32
public static final TensorDataType QINT32
Deprecated.
-
BFLOAT16
public static final TensorDataType BFLOAT16
Deprecated.
-
QINT16
public static final TensorDataType QINT16
Deprecated.
-
QUINT16
public static final TensorDataType QUINT16
Deprecated.
-
UINT16
public static final TensorDataType UINT16
Deprecated.
-
COMPLEX128
public static final TensorDataType COMPLEX128
Deprecated.
-
HALF
public static final TensorDataType HALF
Deprecated.
-
RESOURCE
public static final TensorDataType RESOURCE
Deprecated.
-
VARIANT
public static final TensorDataType VARIANT
Deprecated.
-
UINT32
public static final TensorDataType UINT32
Deprecated.
-
UINT64
public static final TensorDataType UINT64
Deprecated.
-
-
Method Detail
-
values
public static TensorDataType[] values()
Deprecated.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 (TensorDataType c : TensorDataType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TensorDataType valueOf(java.lang.String name)
Deprecated.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
-
fromProtoValue
public static TensorDataType fromProtoValue(java.lang.String value)
Deprecated.Map a tensor data type to a proto value found in tensorflow. Generally, this is just replacing DT_ with empty and returning enum.valueOf(string)- Parameters:
value- the input string- Returns:
- the associated
TensorDataType
-
toPythonName
public static java.lang.String toPythonName(TensorDataType tensorDataType)
Deprecated.Get the python name for the given data type- Parameters:
tensorDataType- the python name for the given data type- Returns:
- float64 for double, float32 for double, float16 for half, otherwise the type's name converted to lower case
-
toNd4jType
public static org.nd4j.linalg.api.buffer.DataType toNd4jType(TensorDataType tensorDataType)
Deprecated.
-
fromNd4jType
public static TensorDataType fromNd4jType(org.nd4j.linalg.api.buffer.DataType dataType)
Deprecated.
-
fromNd4jType
public static TensorDataType fromNd4jType(org.nd4j.linalg.api.ndarray.INDArray array)
Deprecated.
-
toTFType
public org.nd4j.tensorflow.conversion.TensorDataType toTFType()
Deprecated.
-
-