Custom layers and models, fchollet, 2024 - The official guide for creating custom Keras layers, models, and metrics, detailing the stateful nature of metrics and the required methods for implementation.
Better performance with tf.function, TensorFlow Authors, 2024 - This guide provides information on how tf.function converts Python code into a callable TensorFlow graph, which is important for performance and compatibility in Keras custom components.
Distributed training with TensorFlow, TensorFlow Authors, 2024 - Explains how to scale TensorFlow models across multiple devices or machines, including how stateful variables (managed by add_weight) are handled in such setups.