![]() |
Class DistributeOptions
Represents options for distributed data processing.
Aliases:
- Class
tf.compat.v1.data.experimental.DistributeOptions
- Class
tf.compat.v2.data.experimental.DistributeOptions
You can set the distribution options of a dataset through the
experimental_distribute
property of tf.data.Options
; the property is
an instance of tf.data.experimental.DistributeOptions
.
options = tf.data.Options()
options.experimental_distribute.auto_shard = False
dataset = dataset.with_options(options)
__init__
__init__()
Initialize self. See help(type(self)) for accurate signature.
Properties
auto_shard
Whether the dataset should be automatically sharded when processedin a distributed fashion. This is applicable when using Keras with multi-worker/TPU distribution strategy, and by using strategy.experimental_distribute_dataset(). In other cases, this option does nothing. If None, defaults to True.
num_devices
The number of devices attached to this input pipeline. This will be automatically set by MultiDeviceIterator.
Methods
tf.data.experimental.DistributeOptions.__eq__
__eq__(other)
Return self==value.
tf.data.experimental.DistributeOptions.__ne__
__ne__(other)
Return self!=value.