class_docstr: A set of data which is used in the model optimization process. The FeatureSet can be accessed in
  a random data sample sequence. In the training process, the data sequence is a looped endless
  sequence. While in the validation process, the data sequence is a limited length sequence.
  Different from BigDL's DataSet, this FeatureSet could be cached to Intel Optane DC Persistent
  Memory, if you set memory_type to PMEM when creating FeatureSet.
class_docstr_tok: ["A","set","of","data","which","is","used","in","the","model","optimization","process",".","The","FeatureSet","can","be","accessed","in","a","random","data","sample","sequence",".","In","the","training","process",",","the","data","sequence","is","a","looped","endless","sequence",".","While","in","the","validation","process",",","the","data","sequence","is","a","limited","length","sequence",".","Different","from","BigDL","'s","DataSet",",","this","FeatureSet","could","be","cached","to","Intel","Optane","DC","Persistent","Memory",",","if","you","set","memory_type","to","PMEM","when","creating","FeatureSet","."]
docstr: :param func: a function return a tensorflow dataset
  :param total_size: total size of this dataset
  :param bigdl_type: numeric type
  :return: A feature set
docstr_tok: [":","param","func",":","a","function","return","a","tensorflow","dataset",":","param","total_size",":","total","size","of","this","dataset",":","param","bigdl_type",":","numeric","type",":","return",":","A","feature","set"]
code: def tf_dataset(cls, func, total_size, bigdl_type="float"):
      """
      :param func: a function return a tensorflow dataset
      :param total_size: total size of this dataset
      :param bigdl_type: numeric type
      :return: A feature set
      """
      func = CloudPickleSerializer.dumps(CloudPickleSerializer, func)
      jvalue = callZooFunc(
          bigdl_type, "createFeatureSetFromTfDataset", func, total_size
      )
      return cls(jvalue=jvalue)
  
imports: from bigdl.dllib.utils.common import *
  from bigdl.dllib.utils.file_utils import callZooFunc
  from bigdl.dllib.feature.dataset.dataset import DataSet
  from pyspark.serializers import CloudPickleSerializer
  import sys
  import math
  import warnings
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 6 for calling the FeatureSet obj's underlying member method code with example usage: obj.tf_dataset(cls, func, total_size, bigdl_type) and returns: cls