-
Notifications
You must be signed in to change notification settings - Fork 19.4k
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
Can't save a model with Lambda layer #7184
Comments
Can you provide a minimal and complete example that reproduces the issue? |
Maybe would helps to know that it don't happens in windows server 2012. Here is a example:
|
This issue was solved in this StackOverflow thread: |
I've got a similar issues except on a linux server and it's saying it can't pickle NotImplementedType object. Again trying to save a model with a lambda layer as an h5 file. What could be causing this? |
Actually looks like my problem has been mentioned and solved before #6442. Apparently lambda layers are just fragile when it comes to saving them to file, many gotchas, and it's often just better to make and use a custom layer (this what I ended up doing). |
Hi,
Although it has been subject of many correction, the problem still there, and I can't save the model with Lambda layer, using fit_generator. If I use fit (no batches) the problem don't occurs.
Error message:
If I switch to BatchNormalization, the model can be saved, but the loss is much higher then using a simple normalization, like X / 255 - 0.5 .
Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on StackOverflow or join the Keras Slack channel and ask there instead of filing a GitHub issue.
Thank you!
Check that you are up-to-date with the master branch of Keras. You can update with:
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps
If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.
If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps
Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).
The text was updated successfully, but these errors were encountered: