| View source on GitHub | 
Wrapper for Graph.control_dependencies() using the default graph.
tf.control_dependencies(
    control_inputs
)
  See tf.Graph.control_dependencies for more details.
Note: In TensorFlow 2 with eager and/or Autograph, you should not require this method, as ops execute in the expected order thanks to automatic control dependencies. Only usetf.control_dependencieswhen working with v1tf.Graphcode.
When eager execution is enabled, any callable object in the control_inputs list will be called.
| Args | |
|---|---|
| control_inputs | A list of OperationorTensorobjects which must be executed or computed before running the operations defined in the context. Can also beNoneto clear the control dependencies. If eager execution is enabled, any callable object in thecontrol_inputslist will be called. | 
| Returns | |
|---|---|
| A context manager that specifies control dependencies for all operations constructed within the context. | 
    © 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
    https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/control_dependencies