class_docstr: ```
  Wrapper for tf.data.Datasets
  ```
class_docstr_tok: ["``","`","Wrapper","for","tf.data.Datasets","``","`"]
docstr: ```
  Args:
    tfdataset(tf.data.Dataset):  a tf.Dataset instance
    n(int): number of examples in dataset (cardinality, which can't reliably be extracted from tf.data.Datasets)
    y(np.ndarray): y values for each example - should be in the format expected by your moddel (e.g., 1-hot-encoded)
  ```
docstr_tok: ["``","`","Args",":","tfdataset","(","tf.data.Dataset",")",":","a","tf.Dataset","instance","n","(","int",")",":","number","of","examples","in","dataset","(","cardinality",",","which","ca","n't","reliably","be","extracted","from","tf.data.Datasets",")","y","(","np.ndarray",")",":","y","values","for","each","example","-","should","be","in","the","format","expected","by","your","moddel","(","e.g.",",","1-hot-encoded",")","``","`"]
code: def __init__(self, tfdataset, n, y):
      """
      ```
      Args:
        tfdataset(tf.data.Dataset):  a tf.Dataset instance
        n(int): number of examples in dataset (cardinality, which can't reliably be extracted from tf.data.Datasets)
        y(np.ndarray): y values for each example - should be in the format expected by your moddel (e.g., 1-hot-encoded)
      ```
      """
      if not isinstance(tfdataset, tf.data.Dataset):
          raise ValueError(
              "tfdataset must be a fully-configured tf.data.Dataset with batch_size, etc. set appropriately"
          )
      self.tfdataset = tfdataset
      self.bs = next(tfdataset.as_numpy_iterator())[-1].shape[
          0
      ]  # extract batch_size from tfdataset
      self.n = n
      self.y = y
  
imports: from .imports import *
label_desc: Use image node_id 1 to create a new TFDataset object from inherited base classes: Dataset with example: obj = TFDataset(tfdataset, n, y)