tf.data.experimental.OptimizationOptions | TensorFlow v2.16.1 (original) (raw)
tf.data.experimental.OptimizationOptions
Represents options for dataset optimizations.
View aliases
Compat aliases for migration
SeeMigration guide for more details.
tf.compat.v1.data.experimental.OptimizationOptions
tf.data.experimental.OptimizationOptions()
You can set the optimization options of a dataset through theexperimental_optimization
property of tf.data.Options; the property is an instance of tf.data.experimental.OptimizationOptions.
options = tf.data.Options()
options.experimental_optimization.noop_elimination = True
options.experimental_optimization.apply_default_optimizations = False
dataset = dataset.with_options(options)
Attributes | |
---|---|
apply_default_optimizations | Whether to apply default graph optimizations. If False, only graph optimizations that have been explicitly enabled will be applied. |
filter_fusion | Whether to fuse filter transformations. If None, defaults to False. |
filter_parallelization | Whether to parallelize stateless filter transformations. If None, defaults to False. |
inject_prefetch | Whether to inject prefetch transformation as the last transformation when the last transformation is a synchronous transformation. If None, defaults to True. |
map_and_batch_fusion | Whether to fuse map and batch transformations. If None, defaults to True. |
map_and_filter_fusion | Whether to fuse map and filter transformations. If None, defaults to False. |
map_fusion | Whether to fuse map transformations. If None, defaults to False. |
map_parallelization | Whether to parallelize stateless map transformations. If None, defaults to True. |
noop_elimination | Whether to eliminate no-op transformations. If None, defaults to True. |
parallel_batch | Whether to parallelize copying of batch elements. If None, defaults to True. |
seq_interleave_prefetch | Whether to replace parallel interleave using a sequential interleave that prefetches elements from its input iterators. If None, defaults to False. |
shuffle_and_repeat_fusion | Whether to fuse shuffle and repeat transformations. If None, defaults to True. |
Methods
__eq__
__eq__(
other
)
Return self==value.
__ne__
__ne__(
other
)
Return self!=value.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.