Writing Custom Layers and Models, TensorFlow Developers, 2024 (TensorFlow) - Official guide for implementing custom Keras layers by subclassing tf.keras.layers.Layer and custom models by subclassing tf.keras.Model, covering the essential methods __init__, build, call, and get_config.