Enum Class DataType

java.lang.Object
java.lang.Enum<DataType>
org.tensorflow.framework.DataType
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<DataType>, Constable

public enum DataType extends Enum<DataType> implements com.google.protobuf.ProtocolMessageEnum
 (== suppress_warning documentation-presence ==)
 LINT.IfChange
 
Protobuf enum tensorflow.DataType
  • Enum Constant Details

    • DT_INVALID

      public static final DataType DT_INVALID
       Not a legal value for DataType.  Used to indicate a DataType field
       has not been set.
       
      DT_INVALID = 0;
    • DT_FLOAT

      public static final DataType DT_FLOAT
       Data types that all computation devices are expected to be
       capable to support.
       
      DT_FLOAT = 1;
    • DT_DOUBLE

      public static final DataType DT_DOUBLE
      DT_DOUBLE = 2;
    • DT_INT32

      public static final DataType DT_INT32
      DT_INT32 = 3;
    • DT_UINT8

      public static final DataType DT_UINT8
      DT_UINT8 = 4;
    • DT_INT16

      public static final DataType DT_INT16
      DT_INT16 = 5;
    • DT_INT8

      public static final DataType DT_INT8
      DT_INT8 = 6;
    • DT_STRING

      public static final DataType DT_STRING
      DT_STRING = 7;
    • DT_COMPLEX64

      public static final DataType DT_COMPLEX64
       Single-precision complex
       
      DT_COMPLEX64 = 8;
    • DT_INT64

      public static final DataType DT_INT64
      DT_INT64 = 9;
    • DT_BOOL

      public static final DataType DT_BOOL
      DT_BOOL = 10;
    • DT_QINT8

      public static final DataType DT_QINT8
       Quantized int8
       
      DT_QINT8 = 11;
    • DT_QUINT8

      public static final DataType DT_QUINT8
       Quantized uint8
       
      DT_QUINT8 = 12;
    • DT_QINT32

      public static final DataType DT_QINT32
       Quantized int32
       
      DT_QINT32 = 13;
    • DT_BFLOAT16

      public static final DataType DT_BFLOAT16
       Float32 truncated to 16 bits.
       
      DT_BFLOAT16 = 14;
    • DT_QINT16

      public static final DataType DT_QINT16
       Quantized int16
       
      DT_QINT16 = 15;
    • DT_QUINT16

      public static final DataType DT_QUINT16
       Quantized uint16
       
      DT_QUINT16 = 16;
    • DT_UINT16

      public static final DataType DT_UINT16
      DT_UINT16 = 17;
    • DT_COMPLEX128

      public static final DataType DT_COMPLEX128
       Double-precision complex
       
      DT_COMPLEX128 = 18;
    • DT_HALF

      public static final DataType DT_HALF
      DT_HALF = 19;
    • DT_RESOURCE

      public static final DataType DT_RESOURCE
      DT_RESOURCE = 20;
    • DT_VARIANT

      public static final DataType DT_VARIANT
       Arbitrary C++ data types
       
      DT_VARIANT = 21;
    • DT_UINT32

      public static final DataType DT_UINT32
      DT_UINT32 = 22;
    • DT_UINT64

      public static final DataType DT_UINT64
      DT_UINT64 = 23;
    • DT_FLOAT8_E5M2

      public static final DataType DT_FLOAT8_E5M2
       5 exponent bits, 2 mantissa bits.
       
      DT_FLOAT8_E5M2 = 24;
    • DT_FLOAT8_E4M3FN

      public static final DataType DT_FLOAT8_E4M3FN
       4 exponent bits, 3 mantissa bits, finite-only, with
       
      DT_FLOAT8_E4M3FN = 25;
    • DT_INT4

      public static final DataType DT_INT4
       2 NaNs (0bS1111111).
       TODO - b/299182407: Leaving room for remaining float8 types.
       DT_FLOAT8_E4M3FNUZ = 26;
       DT_FLOAT8_E4M3B11FNUZ = 27;
       DT_FLOAT8_E5M2FNUZ = 28;
       
      DT_INT4 = 29;
    • DT_UINT4

      public static final DataType DT_UINT4
      DT_UINT4 = 30;
    • DT_FLOAT_REF

      public static final DataType DT_FLOAT_REF
       Do not use!  These are only for TF1's obsolete reference Variables.
       Every enum above should have a corresponding value below (verified by
       types_test).
       
      DT_FLOAT_REF = 101;
    • DT_DOUBLE_REF

      public static final DataType DT_DOUBLE_REF
      DT_DOUBLE_REF = 102;
    • DT_INT32_REF

      public static final DataType DT_INT32_REF
      DT_INT32_REF = 103;
    • DT_UINT8_REF

      public static final DataType DT_UINT8_REF
      DT_UINT8_REF = 104;
    • DT_INT16_REF

      public static final DataType DT_INT16_REF
      DT_INT16_REF = 105;
    • DT_INT8_REF

      public static final DataType DT_INT8_REF
      DT_INT8_REF = 106;
    • DT_STRING_REF

      public static final DataType DT_STRING_REF
      DT_STRING_REF = 107;
    • DT_COMPLEX64_REF

      public static final DataType DT_COMPLEX64_REF
      DT_COMPLEX64_REF = 108;
    • DT_INT64_REF

      public static final DataType DT_INT64_REF
      DT_INT64_REF = 109;
    • DT_BOOL_REF

      public static final DataType DT_BOOL_REF
      DT_BOOL_REF = 110;
    • DT_QINT8_REF

      public static final DataType DT_QINT8_REF
      DT_QINT8_REF = 111;
    • DT_QUINT8_REF

      public static final DataType DT_QUINT8_REF
      DT_QUINT8_REF = 112;
    • DT_QINT32_REF

      public static final DataType DT_QINT32_REF
      DT_QINT32_REF = 113;
    • DT_BFLOAT16_REF

      public static final DataType DT_BFLOAT16_REF
      DT_BFLOAT16_REF = 114;
    • DT_QINT16_REF

      public static final DataType DT_QINT16_REF
      DT_QINT16_REF = 115;
    • DT_QUINT16_REF

      public static final DataType DT_QUINT16_REF
      DT_QUINT16_REF = 116;
    • DT_UINT16_REF

      public static final DataType DT_UINT16_REF
      DT_UINT16_REF = 117;
    • DT_COMPLEX128_REF

      public static final DataType DT_COMPLEX128_REF
      DT_COMPLEX128_REF = 118;
    • DT_HALF_REF

      public static final DataType DT_HALF_REF
      DT_HALF_REF = 119;
    • DT_RESOURCE_REF

      public static final DataType DT_RESOURCE_REF
      DT_RESOURCE_REF = 120;
    • DT_VARIANT_REF

      public static final DataType DT_VARIANT_REF
      DT_VARIANT_REF = 121;
    • DT_UINT32_REF

      public static final DataType DT_UINT32_REF
      DT_UINT32_REF = 122;
    • DT_UINT64_REF

      public static final DataType DT_UINT64_REF
      DT_UINT64_REF = 123;
    • DT_FLOAT8_E5M2_REF

      public static final DataType DT_FLOAT8_E5M2_REF
      DT_FLOAT8_E5M2_REF = 124;
    • DT_FLOAT8_E4M3FN_REF

      public static final DataType DT_FLOAT8_E4M3FN_REF
      DT_FLOAT8_E4M3FN_REF = 125;
    • DT_INT4_REF

      public static final DataType DT_INT4_REF
       TODO - b/299182407: Leaving room for remaining float8 types.
       DT_FLOAT8_E4M3FNUZ_REF = 126;
       DT_FLOAT8_E4M3B11FNUZ_REF = 127;
       DT_FLOAT8_E5M2FNUZ_REF = 128;
       
      DT_INT4_REF = 129;
    • DT_UINT4_REF

      public static final DataType DT_UINT4_REF
      DT_UINT4_REF = 130;
    • UNRECOGNIZED

      public static final DataType UNRECOGNIZED
  • Field Details

    • DT_INVALID_VALUE

      public static final int DT_INVALID_VALUE
       Not a legal value for DataType.  Used to indicate a DataType field
       has not been set.
       
      DT_INVALID = 0;
      See Also:
    • DT_FLOAT_VALUE

      public static final int DT_FLOAT_VALUE
       Data types that all computation devices are expected to be
       capable to support.
       
      DT_FLOAT = 1;
      See Also:
    • DT_DOUBLE_VALUE

      public static final int DT_DOUBLE_VALUE
      DT_DOUBLE = 2;
      See Also:
    • DT_INT32_VALUE

      public static final int DT_INT32_VALUE
      DT_INT32 = 3;
      See Also:
    • DT_UINT8_VALUE

      public static final int DT_UINT8_VALUE
      DT_UINT8 = 4;
      See Also:
    • DT_INT16_VALUE

      public static final int DT_INT16_VALUE
      DT_INT16 = 5;
      See Also:
    • DT_INT8_VALUE

      public static final int DT_INT8_VALUE
      DT_INT8 = 6;
      See Also:
    • DT_STRING_VALUE

      public static final int DT_STRING_VALUE
      DT_STRING = 7;
      See Also:
    • DT_COMPLEX64_VALUE

      public static final int DT_COMPLEX64_VALUE
       Single-precision complex
       
      DT_COMPLEX64 = 8;
      See Also:
    • DT_INT64_VALUE

      public static final int DT_INT64_VALUE
      DT_INT64 = 9;
      See Also:
    • DT_BOOL_VALUE

      public static final int DT_BOOL_VALUE
      DT_BOOL = 10;
      See Also:
    • DT_QINT8_VALUE

      public static final int DT_QINT8_VALUE
       Quantized int8
       
      DT_QINT8 = 11;
      See Also:
    • DT_QUINT8_VALUE

      public static final int DT_QUINT8_VALUE
       Quantized uint8
       
      DT_QUINT8 = 12;
      See Also:
    • DT_QINT32_VALUE

      public static final int DT_QINT32_VALUE
       Quantized int32
       
      DT_QINT32 = 13;
      See Also:
    • DT_BFLOAT16_VALUE

      public static final int DT_BFLOAT16_VALUE
       Float32 truncated to 16 bits.
       
      DT_BFLOAT16 = 14;
      See Also:
    • DT_QINT16_VALUE

      public static final int DT_QINT16_VALUE
       Quantized int16
       
      DT_QINT16 = 15;
      See Also:
    • DT_QUINT16_VALUE

      public static final int DT_QUINT16_VALUE
       Quantized uint16
       
      DT_QUINT16 = 16;
      See Also:
    • DT_UINT16_VALUE

      public static final int DT_UINT16_VALUE
      DT_UINT16 = 17;
      See Also:
    • DT_COMPLEX128_VALUE

      public static final int DT_COMPLEX128_VALUE
       Double-precision complex
       
      DT_COMPLEX128 = 18;
      See Also:
    • DT_HALF_VALUE

      public static final int DT_HALF_VALUE
      DT_HALF = 19;
      See Also:
    • DT_RESOURCE_VALUE

      public static final int DT_RESOURCE_VALUE
      DT_RESOURCE = 20;
      See Also:
    • DT_VARIANT_VALUE

      public static final int DT_VARIANT_VALUE
       Arbitrary C++ data types
       
      DT_VARIANT = 21;
      See Also:
    • DT_UINT32_VALUE

      public static final int DT_UINT32_VALUE
      DT_UINT32 = 22;
      See Also:
    • DT_UINT64_VALUE

      public static final int DT_UINT64_VALUE
      DT_UINT64 = 23;
      See Also:
    • DT_FLOAT8_E5M2_VALUE

      public static final int DT_FLOAT8_E5M2_VALUE
       5 exponent bits, 2 mantissa bits.
       
      DT_FLOAT8_E5M2 = 24;
      See Also:
    • DT_FLOAT8_E4M3FN_VALUE

      public static final int DT_FLOAT8_E4M3FN_VALUE
       4 exponent bits, 3 mantissa bits, finite-only, with
       
      DT_FLOAT8_E4M3FN = 25;
      See Also:
    • DT_INT4_VALUE

      public static final int DT_INT4_VALUE
       2 NaNs (0bS1111111).
       TODO - b/299182407: Leaving room for remaining float8 types.
       DT_FLOAT8_E4M3FNUZ = 26;
       DT_FLOAT8_E4M3B11FNUZ = 27;
       DT_FLOAT8_E5M2FNUZ = 28;
       
      DT_INT4 = 29;
      See Also:
    • DT_UINT4_VALUE

      public static final int DT_UINT4_VALUE
      DT_UINT4 = 30;
      See Also:
    • DT_FLOAT_REF_VALUE

      public static final int DT_FLOAT_REF_VALUE
       Do not use!  These are only for TF1's obsolete reference Variables.
       Every enum above should have a corresponding value below (verified by
       types_test).
       
      DT_FLOAT_REF = 101;
      See Also:
    • DT_DOUBLE_REF_VALUE

      public static final int DT_DOUBLE_REF_VALUE
      DT_DOUBLE_REF = 102;
      See Also:
    • DT_INT32_REF_VALUE

      public static final int DT_INT32_REF_VALUE
      DT_INT32_REF = 103;
      See Also:
    • DT_UINT8_REF_VALUE

      public static final int DT_UINT8_REF_VALUE
      DT_UINT8_REF = 104;
      See Also:
    • DT_INT16_REF_VALUE

      public static final int DT_INT16_REF_VALUE
      DT_INT16_REF = 105;
      See Also:
    • DT_INT8_REF_VALUE

      public static final int DT_INT8_REF_VALUE
      DT_INT8_REF = 106;
      See Also:
    • DT_STRING_REF_VALUE

      public static final int DT_STRING_REF_VALUE
      DT_STRING_REF = 107;
      See Also:
    • DT_COMPLEX64_REF_VALUE

      public static final int DT_COMPLEX64_REF_VALUE
      DT_COMPLEX64_REF = 108;
      See Also:
    • DT_INT64_REF_VALUE

      public static final int DT_INT64_REF_VALUE
      DT_INT64_REF = 109;
      See Also:
    • DT_BOOL_REF_VALUE

      public static final int DT_BOOL_REF_VALUE
      DT_BOOL_REF = 110;
      See Also:
    • DT_QINT8_REF_VALUE

      public static final int DT_QINT8_REF_VALUE
      DT_QINT8_REF = 111;
      See Also:
    • DT_QUINT8_REF_VALUE

      public static final int DT_QUINT8_REF_VALUE
      DT_QUINT8_REF = 112;
      See Also:
    • DT_QINT32_REF_VALUE

      public static final int DT_QINT32_REF_VALUE
      DT_QINT32_REF = 113;
      See Also:
    • DT_BFLOAT16_REF_VALUE

      public static final int DT_BFLOAT16_REF_VALUE
      DT_BFLOAT16_REF = 114;
      See Also:
    • DT_QINT16_REF_VALUE

      public static final int DT_QINT16_REF_VALUE
      DT_QINT16_REF = 115;
      See Also:
    • DT_QUINT16_REF_VALUE

      public static final int DT_QUINT16_REF_VALUE
      DT_QUINT16_REF = 116;
      See Also:
    • DT_UINT16_REF_VALUE

      public static final int DT_UINT16_REF_VALUE
      DT_UINT16_REF = 117;
      See Also:
    • DT_COMPLEX128_REF_VALUE

      public static final int DT_COMPLEX128_REF_VALUE
      DT_COMPLEX128_REF = 118;
      See Also:
    • DT_HALF_REF_VALUE

      public static final int DT_HALF_REF_VALUE
      DT_HALF_REF = 119;
      See Also:
    • DT_RESOURCE_REF_VALUE

      public static final int DT_RESOURCE_REF_VALUE
      DT_RESOURCE_REF = 120;
      See Also:
    • DT_VARIANT_REF_VALUE

      public static final int DT_VARIANT_REF_VALUE
      DT_VARIANT_REF = 121;
      See Also:
    • DT_UINT32_REF_VALUE

      public static final int DT_UINT32_REF_VALUE
      DT_UINT32_REF = 122;
      See Also:
    • DT_UINT64_REF_VALUE

      public static final int DT_UINT64_REF_VALUE
      DT_UINT64_REF = 123;
      See Also:
    • DT_FLOAT8_E5M2_REF_VALUE

      public static final int DT_FLOAT8_E5M2_REF_VALUE
      DT_FLOAT8_E5M2_REF = 124;
      See Also:
    • DT_FLOAT8_E4M3FN_REF_VALUE

      public static final int DT_FLOAT8_E4M3FN_REF_VALUE
      DT_FLOAT8_E4M3FN_REF = 125;
      See Also:
    • DT_INT4_REF_VALUE

      public static final int DT_INT4_REF_VALUE
       TODO - b/299182407: Leaving room for remaining float8 types.
       DT_FLOAT8_E4M3FNUZ_REF = 126;
       DT_FLOAT8_E4M3B11FNUZ_REF = 127;
       DT_FLOAT8_E5M2FNUZ_REF = 128;
       
      DT_INT4_REF = 129;
      See Also:
    • DT_UINT4_REF_VALUE

      public static final int DT_UINT4_REF_VALUE
      DT_UINT4_REF = 130;
      See Also:
  • Method Details

    • values

      public static DataType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DataType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static DataType valueOf(int value)
      Deprecated.
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • forNumber

      public static DataType forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<DataType> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static DataType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null