Exception encountered: Could not deserialize class 'Functional' because its parent module keras.src.engine.functional cannot be imported.
Issue Description:
While working with TensorFlow 2.12.0, we encountered an issue with model deserialization when using custom objects. Specifically, when attempting to load a model saved as model.keras
, we received the following error:
Exception encountered: Could not deserialize class 'Functional' because its parent module keras.src.engine.functional cannot be imported.
This issue is related to incompatibilities in how TensorFlow's Keras module handles custom layers and models, especially with the .keras
serialization format.