Home | History | Annotate | Download | only in ops

Lines Matching refs:dataset

15 """Non-deterministic dataset transformations."""
31 class ParallelInterleaveDataset(dataset_ops.Dataset):
32 """A `Dataset` that maps a function over its input and flattens the result."""
56 dataset = map_func(*nested_args)
58 dataset = map_func(nested_args)
60 if not isinstance(dataset, dataset_ops.Dataset):
61 raise TypeError("`map_func` must return a `Dataset` object.")
63 self._output_classes = dataset.output_classes
64 self._output_types = dataset.output_types
65 self._output_shapes = dataset.output_shapes
67 return dataset._as_variant_tensor() # pylint: disable=protected-access
121 """A parallel version of the `Dataset.interleave()` transformation.
125 @{tf.data.Dataset.interleave}, it gets elements from `cycle_length` nested
136 filenames = tf.data.Dataset.list_files("/path/to/data/train*.tfrecords")
137 dataset = filenames.apply(
147 map_func: A function mapping a nested structure of tensors to a `Dataset`.
148 cycle_length: The number of input `Dataset`s to interleave from in parallel.
150 `Dataset` before advancing to the next input `Dataset`.
161 A `Dataset` transformation function, which can be passed to
162 @{tf.data.Dataset.apply}.
164 def _apply_fn(dataset):
166 dataset, map_func, cycle_length, block_length, sloppy,
175 """A non-deterministic version of the `Dataset.interleave()` transformation.
177 `sloppy_interleave()` maps `map_func` across `dataset`, and
180 The resulting dataset is almost identical to `interleave`. The key
189 However, if an underlying dataset would block the consumer,
192 dataset instead.
198 filenames = tf.data.Dataset.list_files("/path/to/data/train*.tfrecords")
199 dataset = filenames.apply(
205 WARNING: The order of elements in the resulting dataset is not
206 deterministic. Use `Dataset.interleave()` if you want the elements to have a
212 `Dataset`.
213 cycle_length: The number of input `Dataset`s to interleave from in parallel.
215 `Dataset` before advancing to the next input `Dataset`. Note:
220 A `Dataset` transformation function, which can be passed to
221 @{tf.data.Dataset.apply}.
223 def _apply_fn(dataset):
225 dataset,