class_docstr: Type specification for a `tf.sparse.SparseTensor`.
class_docstr_tok: ["Type","specification","for","a","`","tf.sparse.SparseTensor","`","."]
docstr: Constructs a type specification for a `tf.sparse.SparseTensor`.
  
  Args:
    shape: The dense shape of the `SparseTensor`, or `None` to allow any dense
      shape.
    dtype: `tf.DType` of values in the `SparseTensor`.
docstr_tok: ["Constructs","a","type","specification","for","a","`","tf.sparse.SparseTensor","`",".","Args",":","shape",":","The","dense","shape","of","the","`","SparseTensor","`",",","or","`","None","`","to","allow","any","dense","shape",".","dtype",":","`","tf.DType","`","of","values","in","the","`","SparseTensor","`","."]
code: def __init__(self, shape=None, dtype=dtypes.float32):
      """Constructs a type specification for a `tf.sparse.SparseTensor`.
  
      Args:
        shape: The dense shape of the `SparseTensor`, or `None` to allow any dense
          shape.
        dtype: `tf.DType` of values in the `SparseTensor`.
      """
      self._shape = tensor_shape.as_shape(shape)
      self._dtype = dtypes.as_dtype(dtype)
  
imports: import collections
  import numpy
  from tensorflow.core.protobuf import struct_pb2
  from tensorflow.python import pywrap_tensorflow
  from tensorflow.python import tf2
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import override_binary_operator
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.framework import type_spec
  from tensorflow.python.framework import type_spec_registry
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.ops import gen_sparse_ops
  from tensorflow.python.saved_model import nested_structure_coder
  from tensorflow.python.types import internal
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 to create a new SparseTensorSpec object from inherited base classes: type_spec with example: obj = SparseTensorSpec(shape, dtype)