class_docstr: Represents the type of the elements in a `Tensor`.
  
  The following `DType` objects are defined:
  
  * `tf.float16`: 16-bit half-precision floating-point.
  * `tf.float32`: 32-bit single-precision floating-point.
  * `tf.float64`: 64-bit double-precision floating-point.
  * `tf.bfloat16`: 16-bit truncated floating-point.
  * `tf.complex64`: 64-bit single-precision complex.
  * `tf.complex128`: 128-bit double-precision complex.
  * `tf.int8`: 8-bit signed integer.
  * `tf.uint8`: 8-bit unsigned integer.
  * `tf.uint16`: 16-bit unsigned integer.
  * `tf.uint32`: 32-bit unsigned integer.
  * `tf.uint64`: 64-bit unsigned integer.
  * `tf.int16`: 16-bit signed integer.
  * `tf.int32`: 32-bit signed integer.
  * `tf.int64`: 64-bit signed integer.
  * `tf.bool`: Boolean.
  * `tf.string`: String.
  * `tf.qint8`: Quantized 8-bit signed integer.
  * `tf.quint8`: Quantized 8-bit unsigned integer.
  * `tf.qint16`: Quantized 16-bit signed integer.
  * `tf.quint16`: Quantized 16-bit unsigned integer.
  * `tf.qint32`: Quantized 32-bit signed integer.
  * `tf.resource`: Handle to a mutable resource.
  * `tf.variant`: Values of arbitrary types.
  
  In addition, variants of these types with the `_ref` suffix are
  defined for reference-typed tensors.
  
  The `tf.as_dtype()` function converts numpy types and string type
  names to a `DType` object.
class_docstr_tok: ["Represents","the","type","of","the","elements","in","a","`","Tensor","`",".","The","following","`","DType","`","objects","are","defined",":","*","`","tf.float16","`",":","16-bit","half-precision","floating-point",".","*","`","tf.float32","`",":","32-bit","single-precision","floating-point",".","*","`","tf.float64","`",":","64-bit","double-precision","floating-point",".","*","`","tf.bfloat16","`",":","16-bit","truncated","floating-point",".","*","`","tf.complex64","`",":","64-bit","single-precision","complex",".","*","`","tf.complex128","`",":","128-bit","double-precision","complex",".","*","`","tf.int8","`",":","8-bit","signed","integer",".","*","`","tf.uint8","`",":","8-bit","unsigned","integer",".","*","`","tf.uint16","`",":","16-bit","unsigned","integer",".","*","`","tf.uint32","`",":","32-bit","unsigned","integer",".","*","`","tf.uint64","`",":","64-bit","unsigned","integer",".","*","`","tf.int16","`",":","16-bit","signed","integer",".","*","`","tf.int32","`",":","32-bit","signed","integer",".","*","`","tf.int64","`",":","64-bit","signed","integer",".","*","`","tf.bool","`",":","Boolean",".","*","`","tf.string","`",":","String",".","*","`","tf.qint8","`",":","Quantized","8-bit","signed","integer",".","*","`","tf.quint8","`",":","Quantized","8-bit","unsigned","integer",".","*","`","tf.qint16","`",":","Quantized","16-bit","signed","integer",".","*","`","tf.quint16","`",":","Quantized","16-bit","unsigned","integer",".","*","`","tf.qint32","`",":","Quantized","32-bit","signed","integer",".","*","`","tf.resource","`",":","Handle","to","a","mutable","resource",".","*","`","tf.variant","`",":","Values","of","arbitrary","types",".","In","addition",",","variants","of","these","types","with","the","`","_ref","`","suffix","are","defined","for","reference-typed","tensors",".","The","`","tf.as_dtype","(",")","`","function","converts","numpy","types","and","string","type","names","to","a","`","DType","`","object","."]
docstr: Creates a new `DataType`.
  
  NOTE(mrry): In normal circumstances, you should not need to
  construct a `DataType` object directly. Instead, use the
  `tf.as_dtype()` function.
  
  Args:
    type_enum: A `types_pb2.DataType` enum value.
  
  Raises:
    TypeError: If `type_enum` is not a value `types_pb2.DataType`.
docstr_tok: ["Creates","a","new","`","DataType","`",".","NOTE","(","mrry",")",":","In","normal","circumstances",",","you","should","not","need","to","construct","a","`","DataType","`","object","directly",".","Instead",",","use","the","`","tf.as_dtype","(",")","`","function",".","Args",":","type_enum",":","A","`","types_pb2.DataType","`","enum","value",".","Raises",":","TypeError",":","If","`","type_enum","`","is","not","a","value","`","types_pb2.DataType","`","."]
code: def __init__(self, type_enum):
      """Creates a new `DataType`.
  
      NOTE(mrry): In normal circumstances, you should not need to
      construct a `DataType` object directly. Instead, use the
      `tf.as_dtype()` function.
  
      Args:
        type_enum: A `types_pb2.DataType` enum value.
  
      Raises:
        TypeError: If `type_enum` is not a value `types_pb2.DataType`.
      """
      # TODO(mrry): Make the necessary changes (using __new__) to ensure
      # that calling this returns one of the interned values.
      type_enum = int(type_enum)
      if (
          type_enum not in types_pb2.DataType.values()
          or type_enum == types_pb2.DT_INVALID
      ):
          raise TypeError(
              "type_enum is not a valid types_pb2.DataType: %s"
              % type_enum
          )
      self._type_enum = type_enum
  
imports: import numpy
  from .None import pywrap_tensorflow
  from tensorboard.compat.proto import types_pb2
label_desc: Use image node_id 1 to create a new DType object  with example: obj = DType(type_enum)