Package org.tensorflow.framework
Enum DataType
java.lang.Object
java.lang.Enum<DataType>
org.tensorflow.framework.DataType
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,java.io.Serializable,java.lang.Comparable<DataType>,java.lang.constant.Constable
public enum DataType extends java.lang.Enum<DataType> implements com.google.protobuf.ProtocolMessageEnum
(== suppress_warning documentation-presence ==) LINT.IfChangeProtobuf enum
tensorflow.DataType-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description DT_BFLOAT16Float32 truncated to 16 bits.DT_BFLOAT16_REFDT_BFLOAT16_REF = 114;DT_BOOLDT_BOOL = 10;DT_BOOL_REFDT_BOOL_REF = 110;DT_COMPLEX128Double-precision complexDT_COMPLEX128_REFDT_COMPLEX128_REF = 118;DT_COMPLEX64Single-precision complexDT_COMPLEX64_REFDT_COMPLEX64_REF = 108;DT_DOUBLEDT_DOUBLE = 2;DT_DOUBLE_REFDT_DOUBLE_REF = 102;DT_FLOATData types that all computation devices are expected to be capable to support.DT_FLOAT_REFDo not use! These are only for parameters.DT_HALFDT_HALF = 19;DT_HALF_REFDT_HALF_REF = 119;DT_INT16DT_INT16 = 5;DT_INT16_REFDT_INT16_REF = 105;DT_INT32DT_INT32 = 3;DT_INT32_REFDT_INT32_REF = 103;DT_INT64DT_INT64 = 9;DT_INT64_REFDT_INT64_REF = 109;DT_INT8DT_INT8 = 6;DT_INT8_REFDT_INT8_REF = 106;DT_INVALIDNot a legal value for DataType.DT_QINT16Quantized int16DT_QINT16_REFDT_QINT16_REF = 115;DT_QINT32Quantized int32DT_QINT32_REFDT_QINT32_REF = 113;DT_QINT8Quantized int8DT_QINT8_REFDT_QINT8_REF = 111;DT_QUINT16Quantized uint16DT_QUINT16_REFDT_QUINT16_REF = 116;DT_QUINT8Quantized uint8DT_QUINT8_REFDT_QUINT8_REF = 112;DT_RESOURCEDT_RESOURCE = 20;DT_RESOURCE_REFDT_RESOURCE_REF = 120;DT_STRINGDT_STRING = 7;DT_STRING_REFDT_STRING_REF = 107;DT_UINT16DT_UINT16 = 17;DT_UINT16_REFDT_UINT16_REF = 117;DT_UINT32DT_UINT32 = 22;DT_UINT32_REFDT_UINT32_REF = 122;DT_UINT64DT_UINT64 = 23;DT_UINT64_REFDT_UINT64_REF = 123;DT_UINT8DT_UINT8 = 4;DT_UINT8_REFDT_UINT8_REF = 104;DT_VARIANTArbitrary C++ data typesDT_VARIANT_REFDT_VARIANT_REF = 121;UNRECOGNIZED -
Field Summary
Fields Modifier and Type Field Description static intDT_BFLOAT16_REF_VALUEDT_BFLOAT16_REF = 114;static intDT_BFLOAT16_VALUEFloat32 truncated to 16 bits.static intDT_BOOL_REF_VALUEDT_BOOL_REF = 110;static intDT_BOOL_VALUEDT_BOOL = 10;static intDT_COMPLEX128_REF_VALUEDT_COMPLEX128_REF = 118;static intDT_COMPLEX128_VALUEDouble-precision complexstatic intDT_COMPLEX64_REF_VALUEDT_COMPLEX64_REF = 108;static intDT_COMPLEX64_VALUESingle-precision complexstatic intDT_DOUBLE_REF_VALUEDT_DOUBLE_REF = 102;static intDT_DOUBLE_VALUEDT_DOUBLE = 2;static intDT_FLOAT_REF_VALUEDo not use! These are only for parameters.static intDT_FLOAT_VALUEData types that all computation devices are expected to be capable to support.static intDT_HALF_REF_VALUEDT_HALF_REF = 119;static intDT_HALF_VALUEDT_HALF = 19;static intDT_INT16_REF_VALUEDT_INT16_REF = 105;static intDT_INT16_VALUEDT_INT16 = 5;static intDT_INT32_REF_VALUEDT_INT32_REF = 103;static intDT_INT32_VALUEDT_INT32 = 3;static intDT_INT64_REF_VALUEDT_INT64_REF = 109;static intDT_INT64_VALUEDT_INT64 = 9;static intDT_INT8_REF_VALUEDT_INT8_REF = 106;static intDT_INT8_VALUEDT_INT8 = 6;static intDT_INVALID_VALUENot a legal value for DataType.static intDT_QINT16_REF_VALUEDT_QINT16_REF = 115;static intDT_QINT16_VALUEQuantized int16static intDT_QINT32_REF_VALUEDT_QINT32_REF = 113;static intDT_QINT32_VALUEQuantized int32static intDT_QINT8_REF_VALUEDT_QINT8_REF = 111;static intDT_QINT8_VALUEQuantized int8static intDT_QUINT16_REF_VALUEDT_QUINT16_REF = 116;static intDT_QUINT16_VALUEQuantized uint16static intDT_QUINT8_REF_VALUEDT_QUINT8_REF = 112;static intDT_QUINT8_VALUEQuantized uint8static intDT_RESOURCE_REF_VALUEDT_RESOURCE_REF = 120;static intDT_RESOURCE_VALUEDT_RESOURCE = 20;static intDT_STRING_REF_VALUEDT_STRING_REF = 107;static intDT_STRING_VALUEDT_STRING = 7;static intDT_UINT16_REF_VALUEDT_UINT16_REF = 117;static intDT_UINT16_VALUEDT_UINT16 = 17;static intDT_UINT32_REF_VALUEDT_UINT32_REF = 122;static intDT_UINT32_VALUEDT_UINT32 = 22;static intDT_UINT64_REF_VALUEDT_UINT64_REF = 123;static intDT_UINT64_VALUEDT_UINT64 = 23;static intDT_UINT8_REF_VALUEDT_UINT8_REF = 104;static intDT_UINT8_VALUEDT_UINT8 = 4;static intDT_VARIANT_REF_VALUEDT_VARIANT_REF = 121;static intDT_VARIANT_VALUEArbitrary C++ data types -
Method Summary
Modifier and Type Method Description static DataTypeforNumber(int value)static com.google.protobuf.Descriptors.EnumDescriptorgetDescriptor()com.google.protobuf.Descriptors.EnumDescriptorgetDescriptorForType()intgetNumber()com.google.protobuf.Descriptors.EnumValueDescriptorgetValueDescriptor()static com.google.protobuf.Internal.EnumLiteMap<DataType>internalGetValueMap()static DataTypevalueOf(int value)Deprecated.static DataTypevalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)Returns the enum constant of this type with the specified name.static DataTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static DataType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DT_INVALID
Not a legal value for DataType. Used to indicate a DataType field has not been set.
DT_INVALID = 0; -
DT_FLOAT
Data types that all computation devices are expected to be capable to support.
DT_FLOAT = 1; -
DT_DOUBLE
DT_DOUBLE = 2; -
DT_INT32
DT_INT32 = 3; -
DT_UINT8
DT_UINT8 = 4; -
DT_INT16
DT_INT16 = 5; -
DT_INT8
DT_INT8 = 6; -
DT_STRING
DT_STRING = 7; -
DT_COMPLEX64
Single-precision complex
DT_COMPLEX64 = 8; -
DT_INT64
DT_INT64 = 9; -
DT_BOOL
DT_BOOL = 10; -
DT_QINT8
Quantized int8
DT_QINT8 = 11; -
DT_QUINT8
Quantized uint8
DT_QUINT8 = 12; -
DT_QINT32
Quantized int32
DT_QINT32 = 13; -
DT_BFLOAT16
Float32 truncated to 16 bits. Only for cast ops.
DT_BFLOAT16 = 14; -
DT_QINT16
Quantized int16
DT_QINT16 = 15; -
DT_QUINT16
Quantized uint16
DT_QUINT16 = 16; -
DT_UINT16
DT_UINT16 = 17; -
DT_COMPLEX128
Double-precision complex
DT_COMPLEX128 = 18; -
DT_HALF
DT_HALF = 19; -
DT_RESOURCE
DT_RESOURCE = 20; -
DT_VARIANT
Arbitrary C++ data types
DT_VARIANT = 21; -
DT_UINT32
DT_UINT32 = 22; -
DT_UINT64
DT_UINT64 = 23; -
DT_FLOAT_REF
Do not use! These are only for parameters. Every enum above should have a corresponding value below (verified by types_test).
DT_FLOAT_REF = 101; -
DT_DOUBLE_REF
DT_DOUBLE_REF = 102; -
DT_INT32_REF
DT_INT32_REF = 103; -
DT_UINT8_REF
DT_UINT8_REF = 104; -
DT_INT16_REF
DT_INT16_REF = 105; -
DT_INT8_REF
DT_INT8_REF = 106; -
DT_STRING_REF
DT_STRING_REF = 107; -
DT_COMPLEX64_REF
DT_COMPLEX64_REF = 108; -
DT_INT64_REF
DT_INT64_REF = 109; -
DT_BOOL_REF
DT_BOOL_REF = 110; -
DT_QINT8_REF
DT_QINT8_REF = 111; -
DT_QUINT8_REF
DT_QUINT8_REF = 112; -
DT_QINT32_REF
DT_QINT32_REF = 113; -
DT_BFLOAT16_REF
DT_BFLOAT16_REF = 114; -
DT_QINT16_REF
DT_QINT16_REF = 115; -
DT_QUINT16_REF
DT_QUINT16_REF = 116; -
DT_UINT16_REF
DT_UINT16_REF = 117; -
DT_COMPLEX128_REF
DT_COMPLEX128_REF = 118; -
DT_HALF_REF
DT_HALF_REF = 119; -
DT_RESOURCE_REF
DT_RESOURCE_REF = 120; -
DT_VARIANT_REF
DT_VARIANT_REF = 121; -
DT_UINT32_REF
DT_UINT32_REF = 122; -
DT_UINT64_REF
DT_UINT64_REF = 123; -
UNRECOGNIZED
-
-
Field Details
-
DT_INVALID_VALUE
public static final int DT_INVALID_VALUENot a legal value for DataType. Used to indicate a DataType field has not been set.
DT_INVALID = 0;- See Also:
- Constant Field Values
-
DT_FLOAT_VALUE
public static final int DT_FLOAT_VALUEData types that all computation devices are expected to be capable to support.
DT_FLOAT = 1;- See Also:
- Constant Field Values
-
DT_DOUBLE_VALUE
public static final int DT_DOUBLE_VALUEDT_DOUBLE = 2;- See Also:
- Constant Field Values
-
DT_INT32_VALUE
public static final int DT_INT32_VALUEDT_INT32 = 3;- See Also:
- Constant Field Values
-
DT_UINT8_VALUE
public static final int DT_UINT8_VALUEDT_UINT8 = 4;- See Also:
- Constant Field Values
-
DT_INT16_VALUE
public static final int DT_INT16_VALUEDT_INT16 = 5;- See Also:
- Constant Field Values
-
DT_INT8_VALUE
public static final int DT_INT8_VALUEDT_INT8 = 6;- See Also:
- Constant Field Values
-
DT_STRING_VALUE
public static final int DT_STRING_VALUEDT_STRING = 7;- See Also:
- Constant Field Values
-
DT_COMPLEX64_VALUE
public static final int DT_COMPLEX64_VALUESingle-precision complex
DT_COMPLEX64 = 8;- See Also:
- Constant Field Values
-
DT_INT64_VALUE
public static final int DT_INT64_VALUEDT_INT64 = 9;- See Also:
- Constant Field Values
-
DT_BOOL_VALUE
public static final int DT_BOOL_VALUEDT_BOOL = 10;- See Also:
- Constant Field Values
-
DT_QINT8_VALUE
public static final int DT_QINT8_VALUEQuantized int8
DT_QINT8 = 11;- See Also:
- Constant Field Values
-
DT_QUINT8_VALUE
public static final int DT_QUINT8_VALUEQuantized uint8
DT_QUINT8 = 12;- See Also:
- Constant Field Values
-
DT_QINT32_VALUE
public static final int DT_QINT32_VALUEQuantized int32
DT_QINT32 = 13;- See Also:
- Constant Field Values
-
DT_BFLOAT16_VALUE
public static final int DT_BFLOAT16_VALUEFloat32 truncated to 16 bits. Only for cast ops.
DT_BFLOAT16 = 14;- See Also:
- Constant Field Values
-
DT_QINT16_VALUE
public static final int DT_QINT16_VALUEQuantized int16
DT_QINT16 = 15;- See Also:
- Constant Field Values
-
DT_QUINT16_VALUE
public static final int DT_QUINT16_VALUEQuantized uint16
DT_QUINT16 = 16;- See Also:
- Constant Field Values
-
DT_UINT16_VALUE
public static final int DT_UINT16_VALUEDT_UINT16 = 17;- See Also:
- Constant Field Values
-
DT_COMPLEX128_VALUE
public static final int DT_COMPLEX128_VALUEDouble-precision complex
DT_COMPLEX128 = 18;- See Also:
- Constant Field Values
-
DT_HALF_VALUE
public static final int DT_HALF_VALUEDT_HALF = 19;- See Also:
- Constant Field Values
-
DT_RESOURCE_VALUE
public static final int DT_RESOURCE_VALUEDT_RESOURCE = 20;- See Also:
- Constant Field Values
-
DT_VARIANT_VALUE
public static final int DT_VARIANT_VALUEArbitrary C++ data types
DT_VARIANT = 21;- See Also:
- Constant Field Values
-
DT_UINT32_VALUE
public static final int DT_UINT32_VALUEDT_UINT32 = 22;- See Also:
- Constant Field Values
-
DT_UINT64_VALUE
public static final int DT_UINT64_VALUEDT_UINT64 = 23;- See Also:
- Constant Field Values
-
DT_FLOAT_REF_VALUE
public static final int DT_FLOAT_REF_VALUEDo not use! These are only for parameters. Every enum above should have a corresponding value below (verified by types_test).
DT_FLOAT_REF = 101;- See Also:
- Constant Field Values
-
DT_DOUBLE_REF_VALUE
public static final int DT_DOUBLE_REF_VALUEDT_DOUBLE_REF = 102;- See Also:
- Constant Field Values
-
DT_INT32_REF_VALUE
public static final int DT_INT32_REF_VALUEDT_INT32_REF = 103;- See Also:
- Constant Field Values
-
DT_UINT8_REF_VALUE
public static final int DT_UINT8_REF_VALUEDT_UINT8_REF = 104;- See Also:
- Constant Field Values
-
DT_INT16_REF_VALUE
public static final int DT_INT16_REF_VALUEDT_INT16_REF = 105;- See Also:
- Constant Field Values
-
DT_INT8_REF_VALUE
public static final int DT_INT8_REF_VALUEDT_INT8_REF = 106;- See Also:
- Constant Field Values
-
DT_STRING_REF_VALUE
public static final int DT_STRING_REF_VALUEDT_STRING_REF = 107;- See Also:
- Constant Field Values
-
DT_COMPLEX64_REF_VALUE
public static final int DT_COMPLEX64_REF_VALUEDT_COMPLEX64_REF = 108;- See Also:
- Constant Field Values
-
DT_INT64_REF_VALUE
public static final int DT_INT64_REF_VALUEDT_INT64_REF = 109;- See Also:
- Constant Field Values
-
DT_BOOL_REF_VALUE
public static final int DT_BOOL_REF_VALUEDT_BOOL_REF = 110;- See Also:
- Constant Field Values
-
DT_QINT8_REF_VALUE
public static final int DT_QINT8_REF_VALUEDT_QINT8_REF = 111;- See Also:
- Constant Field Values
-
DT_QUINT8_REF_VALUE
public static final int DT_QUINT8_REF_VALUEDT_QUINT8_REF = 112;- See Also:
- Constant Field Values
-
DT_QINT32_REF_VALUE
public static final int DT_QINT32_REF_VALUEDT_QINT32_REF = 113;- See Also:
- Constant Field Values
-
DT_BFLOAT16_REF_VALUE
public static final int DT_BFLOAT16_REF_VALUEDT_BFLOAT16_REF = 114;- See Also:
- Constant Field Values
-
DT_QINT16_REF_VALUE
public static final int DT_QINT16_REF_VALUEDT_QINT16_REF = 115;- See Also:
- Constant Field Values
-
DT_QUINT16_REF_VALUE
public static final int DT_QUINT16_REF_VALUEDT_QUINT16_REF = 116;- See Also:
- Constant Field Values
-
DT_UINT16_REF_VALUE
public static final int DT_UINT16_REF_VALUEDT_UINT16_REF = 117;- See Also:
- Constant Field Values
-
DT_COMPLEX128_REF_VALUE
public static final int DT_COMPLEX128_REF_VALUEDT_COMPLEX128_REF = 118;- See Also:
- Constant Field Values
-
DT_HALF_REF_VALUE
public static final int DT_HALF_REF_VALUEDT_HALF_REF = 119;- See Also:
- Constant Field Values
-
DT_RESOURCE_REF_VALUE
public static final int DT_RESOURCE_REF_VALUEDT_RESOURCE_REF = 120;- See Also:
- Constant Field Values
-
DT_VARIANT_REF_VALUE
public static final int DT_VARIANT_REF_VALUEDT_VARIANT_REF = 121;- See Also:
- Constant Field Values
-
DT_UINT32_REF_VALUE
public static final int DT_UINT32_REF_VALUEDT_UINT32_REF = 122;- See Also:
- Constant Field Values
-
DT_UINT64_REF_VALUE
public static final int DT_UINT64_REF_VALUEDT_UINT64_REF = 123;- See Also:
- Constant Field Values
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
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:
value- 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
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
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:
desc- 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
-