tf.config.experimental.set_synchronous_execution
Stay organized with collections
Save and categorize content based on your preferences.
Specifies whether operations are executed synchronously or asynchronously.
tf.config.experimental.set_synchronous_execution(
enable
)
TensorFlow can execute operations synchronously or asynchronously. If
asynchronous execution is enabled, operations may return "non-ready" handles.
When enable
is set to None, an appropriate value will be picked
automatically. The value picked may change between TensorFlow releases.
Args |
enable
|
Whether operations should be dispatched synchronously.
Valid values:
- None: sets the system default.
- True: executes each operation synchronously.
- False: executes each operation asynchronously.
|
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.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.config.experimental.set_synchronous_execution\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/config/experimental/set_synchronous_execution) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/framework/config.py#L272-L294) |\n\nSpecifies whether operations are executed synchronously or asynchronously.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.config.experimental.set_synchronous_execution`](/api_docs/python/tf/config/experimental/set_synchronous_execution)\n\n\u003cbr /\u003e\n\n tf.config.experimental.set_synchronous_execution(\n enable\n )\n\nTensorFlow can execute operations synchronously or asynchronously. If\nasynchronous execution is enabled, operations may return \"non-ready\" handles.\n\nWhen `enable` is set to None, an appropriate value will be picked\nautomatically. The value picked may change between TensorFlow releases.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `enable` | Whether operations should be dispatched synchronously. Valid values: \u003cbr /\u003e - None: sets the system default. - True: executes each operation synchronously. - False: executes each operation asynchronously. |"]]