tf.data.Options

Represents options for tf.data.Dataset.

Represents options for tf.data.Dataset.

Used in the notebooks

Used in the tutorials

An Options object can be, for instance, used to control which graph optimizations to apply or whether to use performance modeling to dynamically tune the parallelism of operations such as tf.data.Dataset.map or tf.data.Dataset.interleave.

After constructing an Options object, use dataset.with_options(options) to apply the options to a dataset.

dataset = tf.data.Dataset.range(3)
options = tf.data.Options()