class_docstr: Describes a tf.Tensor.
  
  Metadata for describing the `tf.Tensor` objects accepted or returned
  by some TensorFlow APIs.
docstr: Creates a TensorSpec.
  
  Args:
    shape: Value convertible to `tf.TensorShape`. The shape of the tensor.
    dtype: Value convertible to `tf.DType`. The type of the tensor values.
    name: Optional name for the Tensor.
  
  Raises:
    TypeError: If shape is not convertible to a `tf.TensorShape`, or dtype is
      not convertible to a `tf.DType`.
docstr_tok: ["Creates","a","TensorSpec",".","Args",":","shape",":","Value","convertible","to","`","tf.TensorShape","`",".","The","shape","of","the","tensor",".","dtype",":","Value","convertible","to","`","tf.DType","`",".","The","type","of","the","tensor","values",".","name",":","Optional","name","for","the","Tensor",".","Raises",":","TypeError",":","If","shape","is","not","convertible","to","a","`","tf.TensorShape","`",",","or","dtype","is","not","convertible","to","a","`","tf.DType","`","."]
code: def __init__(self, shape, dtype=dtypes.float32, name=None):
      """Creates a TensorSpec.
  
      Args:
        shape: Value convertible to `tf.TensorShape`. The shape of the tensor.
        dtype: Value convertible to `tf.DType`. The type of the tensor values.
        name: Optional name for the Tensor.
  
      Raises:
        TypeError: If shape is not convertible to a `tf.TensorShape`, or dtype is
          not convertible to a `tf.DType`.
      """
      self._shape = tensor_shape.TensorShape(shape)
      try:
          self._shape_tuple = tuple(self.shape.as_list())
      except ValueError:
          self._shape_tuple = None
      self._dtype = dtypes.as_dtype(dtype)
      self._name = name
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensorflow.python.framework import common_shapes
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
label_desc: Use image node_id 1 to create a new TensorSpec object from inherited base classes: object with example: obj = TensorSpec(shape, dtype, name)