Module: tf.data.experimental

Defined in tensorflow/_api/v1/data/experimental/__init__.py.

Experimental API for building input pipelines.

This module contains experimental Dataset sources and transformations that can be used in conjunction with the tf.data.Dataset API. Note that the tf.data.experimental API is not subject to the same backwards compatibility guarantees as tf.data, but we will provide deprecation advice in advance of removing existing functionality.

See Importing Data for an overview.

Classes

class CheckpointInputPipelineHook: Checkpoints input pipeline state every N steps or seconds.

class CsvDataset: A Dataset comprising lines from one or more CSV files.

class DatasetStructure: Represents a Dataset of structured values.

class NestedStructure: Represents a nested structure in which each leaf is a Structure.

class OptimizationOptions: Represents options for dataset optimizations.

class Optional: Wraps a nested structure of tensors that may/may not be present at runtime.

class OptionalStructure: Represents an optional potentially containing a structured value.

class RandomDataset: A Dataset of pseudorandom values.

class Reducer: A reducer is used for reducing a set of elements.

class SparseTensorStructure: Represents structural information about a tf.SparseTensor.

class SqlDataset: A Dataset consisting of the results from a SQL query.

class StatsAggregator: A stateful resource that aggregates statistics from one or more iterators.

class StatsOptions: Represents options for collecting dataset stats using StatsAggregator.

class Structure: Represents structural information, such as type and shape, about a value.

class TFRecordWriter: Writes data to a TFRecord file.

class TensorStructure: Represents structural information about a tf.Tensor.

class ThreadingOptions: Represents options for dataset threading.

Functions

Counter(...): Creates a Dataset that counts from start in steps of size step.

bucket_by_sequence_length(...): A transformation that buckets elements in a Dataset by length.

cardinality(...): Returns the cardinality of dataset, if known.

choose_from_datasets(...): Creates a dataset that deterministically chooses elements from datasets.

copy_to_device(...): A transformation that copies dataset elements to the given target_device.

dense_to_sparse_batch(...): A transformation that batches ragged elements into tf.SparseTensors.

enumerate_dataset(...): A transformation that enumerates the elements of a dataset.

filter_for_shard(...): Creates a Dataset that includes only 1/num_shards of this dataset.

get_next_as_optional(...): Returns an Optional that contains the next value from the iterator.

get_single_element(...): Returns the single element in dataset as a nested structure of tensors.

group_by_reducer(...): A transformation that groups elements and performs a reduction.

group_by_window(...): A transformation that groups windows of elements by key and reduces them.

ignore_errors(...): Creates a Dataset from another Dataset and silently ignores any errors.

latency_stats(...): Records the latency of producing each element of the input dataset.

make_batched_features_dataset(...)

make_csv_dataset(...): Reads CSV files into a dataset.

make_saveable_from_iterator(...): Returns a SaveableObject for saving/restore iterator state using Saver.

map_and_batch(...): Fused implementation of map and batch.

parallel_interleave(...): A parallel version of the Dataset.interleave() transformation.

parse_example_dataset(...): A transformation that parses Example protos into a dict of tensors.

prefetch_to_device(...): A transformation that prefetches dataset values to the given device.

rejection_resample(...): A transformation that resamples a dataset to achieve a target distribution.

sample_from_datasets(...): Samples elements at random from the datasets in datasets.

scan(...): A transformation that scans a function across an input dataset.

shuffle_and_repeat(...): Shuffles and repeats a Dataset returning a new permutation for each epoch.

unbatch(...): Splits elements of a dataset into multiple elements on the batch dimension.

unique(...): Creates a Dataset from another Dataset, discarding duplicates.

Other Members

AUTOTUNE

INFINITE_CARDINALITY

UNKNOWN_CARDINALITY