To use the existing model files in the Keras v3 environment, convert the existing model in the Keras v2 environment to the TF SavedModel format, and update the model loading and inference parts to correspond to these changes for Keras v3.
My test results confirm that it now works correctly with TensorFlow version 2.16.1( keras 3.3.3 ) with python 3.12.3 (test.py)
To use the existing model files in the Keras v3 environment, convert the existing model in the Keras v2 environment to the TF SavedModel format, and update the model loading and inference parts to correspond to these changes for Keras v3.
My test results confirm that it now works correctly with TensorFlow version 2.16.1( keras 3.3.3 ) with python 3.12.3 (test.py)