When eager execution is enabled, any callable object in the control_inputs
list will be called.
Args
control_inputs
A list of Operation or Tensor objects which must be
executed or computed before running the operations defined in the context.
Can also be None to clear the control dependencies. If eager execution
is enabled, any callable object in the control_inputs list will be
called.
Returns
A context manager that specifies control dependencies for all
operations constructed within the context.
[null,null,["Last updated 2023-03-17 UTC."],[],[],null,["# tf.control_dependencies\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.10.1/tensorflow/python/framework/ops.py#L5606-L5639) |\n\nWrapper for [`Graph.control_dependencies()`](../tf/Graph#control_dependencies) using the default graph.\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.control_dependencies`](https://www.tensorflow.org/api_docs/python/tf/control_dependencies)\n\n\u003cbr /\u003e\n\n tf.control_dependencies(\n control_inputs\n )\n\nSee [`tf.Graph.control_dependencies`](../tf/Graph#control_dependencies) for more details.\n| **Note:** *In TensorFlow 2 with eager and/or Autograph, you should not require\n| this method, as ops execute in the expected order thanks to automatic control\n| dependencies.* Only use [`tf.control_dependencies`](../tf/control_dependencies) when working with v1 [`tf.Graph`](../tf/Graph) code.\n\nWhen eager execution is enabled, any callable object in the `control_inputs`\nlist will be called.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `control_inputs` | A list of `Operation` or `Tensor` objects which must be executed or computed before running the operations defined in the context. Can also be `None` to clear the control dependencies. If eager execution is enabled, any callable object in the `control_inputs` list will be called. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A context manager that specifies control dependencies for all operations constructed within the context. ||\n\n\u003cbr /\u003e"]]