You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when attempting to load pre-trained model in Keras 3, encountering issue:
ValueError: File format not supported:
filepath=/home/srvk/Desktop/lstm_w/lstm_word_segmentation/Models/Thai_graphclust_model4_heavy.
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(/home/srvk/Desktop/lstm_w/lstm_word_segmentation/Models/Thai_graphclust_model4_heavy
Environment:
TensorFlow Version: 2.16.1
Keras Version: 3.0.5
P.S. -- when I change the extension to .keras and then try to load the model, it says File not found: filepath="filepath" which is expected as the trained models are not in this format.
Most of these models were trained in 2021 so it doesn't surprise me that the latest version of Keras has trouble reading them. I suggest following through with the steps outlined in the error.
when attempting to load pre-trained model in Keras 3, encountering issue:
References:
related issue
docs
Environment:
TensorFlow Version: 2.16.1
Keras Version: 3.0.5
P.S. -- when I change the extension to
.keras
and then try to load the model, it saysFile not found: filepath="filepath"
which is expected as the trained models are not in this format.CC @sffc
The text was updated successfully, but these errors were encountered: