class_docstr: FloatSparseTensorGenerator generates tf.sparse.SparseTensor with dtype in tf.float32
  or tf.float64.
class_docstr_tok: ["FloatSparseTensorGenerator","generates","tf.sparse.SparseTensor","with","dtype","in","tf.float32","or","tf.float64","."]
docstr: Create a new FloatSparseTensorGenerator
  
  The generated float range is between 0.0 to 1.0.
  
  Args:
    spec: A tf.SparseTensorSpec that describes the output tensor.
    num_values: A value distribution or an int specifying number of non-zero values in the sparse tensor.
  
  Raises:
    TypeError: If dtype in spec is not tf.float32 or tf.float64.
docstr_tok: ["Create","a","new","FloatSparseTensorGenerator","The","generated","float","range","is","between","0.0","to","1.0",".","Args",":","spec",":","A","tf.SparseTensorSpec","that","describes","the","output","tensor",".","num_values",":","A","value","distribution","or","an","int","specifying","number","of","non-zero","values","in","the","sparse","tensor",".","Raises",":","TypeError",":","If","dtype","in","spec","is","not","tf.float32","or","tf.float64","."]
code: def __init__(self, spec, num_values):
      """Create a new FloatSparseTensorGenerator
  
      The generated float range is between 0.0 to 1.0.
  
      Args:
        spec: A tf.SparseTensorSpec that describes the output tensor.
        num_values: A value distribution or an int specifying number of non-zero values in the sparse tensor.
  
      Raises:
        TypeError: If dtype in spec is not tf.float32 or tf.float64.
      """
      super().__init__(spec, num_values)
  
      if spec.dtype not in [tf.float32, tf.float64]:
          raise TypeError(
              "FloatSparseTensorGenerator can only generate tf.sparse.SparseTensor with "
              f"dtype in tf.float32 or tf.float64 but found {spec.dtype}."
          )
  
imports: import enum
  import random
  import hashlib
  import numpy
  import tensorflow
  from tests.test_atds_avro.utils.generator.generator_base import Generator
  from tests.test_atds_avro.utils.hash_util import int_to_bytes
label_desc: Use image node_id 1 to create a new FloatSparseTensorGenerator object from inherited base classes: SparseTensorGeneratorBase with example: obj = FloatSparseTensorGenerator(spec, num_values)