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 2020-10-01 UTC."],[],[],null,["# tf.control_dependencies\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/control_dependencies) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.3.0/tensorflow/python/framework/ops.py#L5325-L5359) |\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`](/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)\nfor more details.\n| **Note:** *In TensorFlow 2 with eager and/or Autograph, you should not require\n| this method, as code executes in the expected order.* Only use [`tf.control_dependencies`](../tf/control_dependencies) when working with v1-style code or in a graph context such as inside [`Dataset.map`](../tf/data/Dataset#map).\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"]]