|TensorFlow 1 version||View source on GitHub|
Represents options for tf.data.Dataset.
Compat aliases for migration
See Migration guide for more details.
Used in the notebooks
|Used in the tutorials|
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
After constructing an
Options object, use
apply the options to a dataset.
dataset = tf.data.Dataset.range(3)
options = tf.data.Options()
# Set options here.
dataset = dataset.with_options(options)
||Whether the outputs need to be produced in deterministic order. If None, defaults to True.|
The distribution strategy options associated with the dataset. See
||By default, tf.data will refuse to serialize a dataset or checkpoint its iterator if the dataset contains a stateful op as the serialization / checkpointing won't be able to capture its state. Users can -- at their own risk -- override this restriction by explicitly specifying that they are fine throwing away the state in these ops. There are three settings available - IGNORE: in which wecompletely ignore any state; WARN: We warn the user that some state might be thrown away; FAIL: We fail if any state is being captured.|
The optimization options associated with the dataset. See
Whether to introduce 'slack' in the last
The statistics options associated with the dataset. See
The threading options associated with the dataset. See
merge( options )
Merges itself with the given
tf.data.Options can be merged as long as there does not exist an
attribute that is set to different values in
if the given
__eq__( other )
__ne__( other )