Closed doiko closed 3 days ago
Hi there,
compile=True
should be used in my opinion:saved_model = keras.models.load_model('/tmp/saved_model.keras', compile=True)
That seems to solve both issues.
Tagging @sachinprasadhs in case smone can double check.
Hi @ghsanti , @sachinprasadhs Issue is that both Input and Output types are changed. I see no difference when I add the compile=True Can you please confirm your suggestion.
@doiko interesting, indeed I just noticed that the install command I used is !pip install --upgrade keras-nightly
So it may have been fixed.
Indeed @ghsanti , @sachinprasadhs
install --upgrade keras-nightly
solved the issue.
Any idea when this will be pushed to release? Models saved with this release will be tricky to handle in the future..
They may want to do a minor release idk. I'd guess that it's related to this commit.
Maybe @mehtamansi29 can help.
Hi @doiko -
Here getting the error while cloning the model. Here while cloning the model no need to define in input_tensors as list.
Remove the list from clone_model this line clone_saved = clone_model(saved_model, input_tensors=Input((256, 128, 1), sparse=False))
will resolve the error in keras3.6.0.
Attached gist for your reference.
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.
This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.
Hi there, using: keras==3.4.1, tensorflow==2.17.0 The input_tensors parameter of clone_model should be in list after restoring a saved model. It was not like this for versions 2.15. Now the some function needs different parameter for fresh or restored models.
Saving and restoring the model is changing type of model inputs and outputs....
Minimal example: !pip install --upgrade keras==3.4.1
output is: