Can't run flask --debug run . #457
-
env:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The issue is that the model weights are saved in a format that is incompatible with your tensorflow version. The error may have to do with the checkpoint file name that has a I discussed the issue in my Flask-Upgrade branch below: The updated file with fixes are below: Ill also link the pr diff here: im not exactly certain what causes this error but i got it work by just reverting the nn runner to previous version. |
Beta Was this translation helpful? Give feedback.
-
So can I delete the flask file and copy-paste the updated one, and it should work? |
Beta Was this translation helpful? Give feedback.
The issue is that the model weights are saved in a format that is incompatible with your tensorflow version.
here is the important bit:
ValueError: File format not supported: filepath=Models/NN_Models/Trained-Model-ML-1699315388.285516. 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(Models/NN_Models/Trained-Model-ML-1699315388.285516, call_endpoint='serving_default') (note that your call_endpoint might have a different name).
The error may have to do with the check…