ThomasMBury / ewstools

Python package for early warning signals (EWS) of bifurcations in time series data.
MIT License
75 stars 16 forks source link

Error while uploading existing model in deeplearning tutorial #438

Closed harishankar1014 closed 6 months ago

harishankar1014 commented 7 months ago

ValueError: File format not supported: filepath=..\ewstools\saved_classifiers\bury_pnas_21\len500\best_model_1_1_len500.pkl. 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(C:\Users\Murali\Desktop\Mtech\Sem4\stock\ewstools\saved_classifiers\bury_pnas_21\len500\best_model_1_1_len500.pkl, call_endpoint='serving_default') (note that your call_endpoint might have a different name).

Any suggestion on how to handle this error?

ThomasMBury commented 7 months ago

Hi there, It seems that the classifiers are only compatible with Keras 2. You should be able to run the tutorials if you install Keras 2 in your virtual environment. Tom