-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
An error when saving/opening model and weights (babi_memnn)! #2659
Comments
Yes, there appears to be an issue with model serialization for deeply nested Sequential models. I'm looking into it. Note that a simple fix would be to use the functional API (recommended for complex models) instead of deeply nested Sequential models. |
@fchollet When I am using the functional API to create the model and try to save it using the following line, It gives me the following error saying:
|
Please provide the code to reproduce your error. |
|
@akmahaja Is it your complete code? Your |
@fchollet @joelthchao I am using the input2, I hadn't included that in the earlier version. I have updated the code with the latest version that I am working on, still the same issue. |
The keyword here is "reproduce", if you share some code snippet that I can't run and thus doesn't allow me to reproduce your error, that's not very helpful... |
@fchollet this is the entire code here that I am using to reproduce the error. Are you referring to X_train1 and X_train2, y_train values? |
I have fixed the issue from OP. @akmahaja please open a thread for your own issue, which is different from this one. It should have a code snippet which I can copy and run (i.e. it should be self-contained, include imports and data. Use randomly generated data). |
I just used the example script
examples/babi_memnn.py
and added the saving code at the end of the file.And after the training is finished I try to load the model with
and then get the
Exception: You are trying to load a weight file containing 11 layers into a model with 13 layers.
Here is the gist https://gist.github.com/anonymous/f433fa0b79d251b77edf8d862071841a
The text was updated successfully, but these errors were encountered: