Closed sunilsarolkarcds closed 6 months ago
That's a pretty interesting bug, thanks for the report. Deserializing a model that contains Bidirectional(LSTM)
seems to leave the wrapped layer unbuilt which causes weight loading to fail. We'll fix that.
As a workaround, just call new_model.load_weights("model.keras")
after re-instanting your model (new_model
) from code.
This is now fixed at HEAD.
Issue seems to still persist with tensorflow backend using keras-nightly
, https://gist.github.com/sachinprasadhs/eb2d2af87610b06cad3843ac5699089a
Hi team, I just reinstalled Keras, now version is : keras-3.4.1, still having same trouble.
We are developing Keras 3 model using Bidirectional LSTM using
pytorch
as a backend, we have trained the model and spent entire day training it and saved in the end in.keras
extension, but we are not able to load back saved model with weights it gives error as belowPytorch and keras versions
OUTPUT
Sample model code
Model training
Saving and loading back the model
OUTPUT
Can someone help on this, is there any workaround to load the existing saved model