-
Notifications
You must be signed in to change notification settings - Fork 29
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
rnn with initial_state model can't be loaded with load_model #32
Comments
I think I am facing the same issue with |
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. |
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.13.0
Custom code
Yes
OS platform and distribution
No response
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
A simple RNN with LSTMcell model.
I want to initialize the states with
initial_state_h
andinitial_state_c
.After compile and train, the model is saved with
model.save('my_model_test.keras')
.But when I try to load it with
load_model = tf.keras.models.load_model('my_model_test.keras')
, it gives error:I tried to save in other format,
.h5
,.json
, etc. All give the same error.But, if I don't use
initial_state
inoutputs,states_h_fw, states_c_fw= lstm_layer_fw(inputs)
, everything goes well. No problem withload_model
.Standalone code to reproduce the issue
Relevant log output
The text was updated successfully, but these errors were encountered: