Better performance with tf.function and ConcreteFunctions, TensorFlow Authors, 2024 (TensorFlow (Google)) - This guide is the official and most up-to-date resource for understanding tf.function, tracing, AutoGraph, and tf.Variable interaction. It includes explanations and examples directly relevant to the section.
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, Aurélien Géron, 2022 (O'Reilly Media) - This book provides practical examples and a comprehensive explanation of tf.function, its role in TensorFlow 2.x, and how it manages graphs and state, building on the official documentation.
TensorFlow: A System for Large-Scale Machine Learning, Martín Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek G. Murray, Benoit Steiner, Paul Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, Xiaoqiang Zheng, 201612th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16) (USENIX Association) - This foundational paper introduces the original TensorFlow system, including its graph execution model, which provides essential context for understanding how tf.function leverages and optimizes these graphs in TensorFlow 2.x.