Was this section helpful?
tf.function
and AutoGraph convert Python code, including control flow statements, into TensorFlow graphs, covering the use of tf.cond
and tf.while_loop
.tf.cond
, The TensorFlow Authors, 2023 - The official API documentation for tf.cond
, providing detailed information on its parameters, usage for conditional execution within TensorFlow graphs, and requirements for branch functions.tf.while_loop
, The TensorFlow Authors, 2023 - The official API documentation for tf.while_loop
, detailing its parameters, use for iterative execution within TensorFlow graphs, and managing loop variables and shape invariants.tf.TensorArray
, The TensorFlow Authors, 2023 (Google (TensorFlow)) - The official API documentation for tf.TensorArray
, explaining its functionality for accumulating tensors of dynamic sizes within graph-mode loops in TensorFlow.