Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading h5 models #219

Open
Psyhich opened this issue Oct 25, 2022 · 1 comment
Open

Loading h5 models #219

Psyhich opened this issue Oct 25, 2022 · 1 comment

Comments

@Psyhich
Copy link

Psyhich commented Oct 25, 2022

Hi, I'm trying to use your library to load model in h5 format, but it's maybe ill formed or just not possible.
I've created model using such python code:

stacked = tf.keras.layers.StackedRNNCells(\
    [tf.keras.layers.LSTMCell(lstm_count) for _ in range(lstm_layers_count)])
    
model = tf.keras.Sequential([
    tf.keras.layers.RNN(stacked),
    tf.keras.layers.Dense(outpust_count)
])

And I cannot save it in other formats because I will not be able to use functions of this model.
So my question is it possible to load such model using your library or I should look for something else?

@yochananscharf
Copy link

Save the model in the saved_model format.
This can be done by doing model.save("model_name").
Tensorflow will save the model in the saved_model format if you don't put .h5 in "model_name".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants