def __init__(self, dataset):
        """
        Args:
            dataset (tf.data.Dataset or DataFlow):
        """
        if isinstance(dataset, tf.data.Dataset):
            self._dataset = dataset
            self._dataflow = None
        elif isinstance(dataset, DataFlow):
            self._dataset = None
            self._dataflow = dataset
        else:
            raise ValueError("TFDatasetInput takes a tf.data.Dataset or DataFlow! Got {}".format(dataset))

        Args:
            dataset (tf.data.Dataset or DataFlow):
        
tensorpack/input_source/input_source.py