Starting inference log | |
Model path: saved_model_age_regressor | |
Image path: data\UTKFace\53_1_1_20170110122449716.jpg.chip.jpg | |
Attempting to load model with compile=False... | |
Traceback (most recent call last): | |
File "C:\Users\SammyHarris\Downloads\Age-classification-model\inference_log.py", line 23, in <module> | |
m = tf.keras.models.load_model(model_path, compile=False) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
File "C:\Users\SammyHarris\Downloads\Age-classification-model\.venv\Lib\site-packages\keras\src\saving\saving_api.py", line 209, in load_model | |
raise ValueError( | |
ValueError: File format not supported: filepath=saved_model_age_regressor. Keras 3 only supports V3 `.keras` files and legacy H5 format files (`.h5` extension). Note that the legacy SavedModel format is not supported by `load_model()` in Keras 3. In order to reload a TensorFlow SavedModel as an inference-only layer in Keras 3, use `keras.layers.TFSMLayer(saved_model_age_regressor, call_endpoint='serving_default')` (note that your `call_endpoint` might have a different name). | |
Inference script caught exception | |