Class OptimizationOptions
Defined in tensorflow/python/data/experimental/ops/optimization_options.py
.
Represents options for dataset optimizations.
You can set the optimization options of a dataset through the
experimental_optimization
property of tf.data.Options
; the property is
an instance of tf.data.experimental.OptimizationOptions
.
options = tf.data.Options()
options.experimental_optimization.map_vectorization = True
options.apply_default_optimizations = False
dataset = dataset.with_options(options)
__init__
__init__()
Initialize self. See help(type(self)) for accurate signature.
Properties
apply_default_optimizations
Whether to apply default static optimizations. If False, only static optimizations that have been explicitly enabled will be applied.
filter_fusion
Whether to fuse filter transformations. If None, defaults to False.
hoist_random_uniform
Whether to hoist tf.random_uniform()
ops out of map transformations. If None, defaults to False.
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 False.
map_vectorization
Whether to vectorize map transformations. If None, defaults to False.
noop_elimination
Whether to eliminate no-op transformations. If None, defaults to True.
shuffle_and_repeat_fusion
Whether to fuse shuffle and repeat transformations. If None, defaults to True.
Methods
tf.data.experimental.OptimizationOptions.__eq__
__eq__(other)
Return self==value.
tf.data.experimental.OptimizationOptions.__ne__
__ne__(other)
Return self!=value.
tf.data.experimental.OptimizationOptions.__setattr__
__setattr__(
name,
value
)
Implement setattr(self, name, value).