tf.data.ThreadingOptions  |  TensorFlow v2.16.1 (original) (raw)

tf.data.ThreadingOptions

Stay organized with collections Save and categorize content based on your preferences.

Represents options for dataset threading.

View aliases

Main aliases

tf.data.experimental.ThreadingOptions

Compat aliases for migration

SeeMigration guide for more details.

tf.compat.v1.data.ThreadingOptions, tf.compat.v1.data.experimental.ThreadingOptions

tf.data.ThreadingOptions()

You can set the threading options of a dataset through thethreading property of tf.data.Options; the property is an instance of tf.data.ThreadingOptions.

options = tf.data.Options()
options.threading.private_threadpool_size = 10
dataset = dataset.with_options(options)
Attributes
max_intra_op_parallelism If set, it overrides the maximum degree of intra-op parallelism.
private_threadpool_size If set, the dataset will use a private threadpool of the given size. The value 0 can be used to indicate that the threadpool size should be determined at runtime based on the number of available CPU cores.

Methods

__eq__

View source

__eq__(
    other
)

Return self==value.

__ne__

View source

__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.