Default use case for custom loss in V2 (for me) was: 1. Register custom loss with register_keras_serializable 2. Use it in model compile by name compile(loss="MyPackage>MyLoss") This worked in Keras V2, but not working in Keras V3. Here is a simple test https://colab.research.google.com/drive/1R3z3fFhV7NN1Oa_HJYp60LsneoxjOlvj?usp=sharing