-
Notifications
You must be signed in to change notification settings - Fork 74.3k
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
Serialization problems in keras when using add_loss or '.tf' extension for saving #31298
Comments
@nguerinjr |
Yes. All problems occur exactly the same way in version installed with |
I have tried on colab with TF version nightly versions 2.0.0.dev20190802 , 2.0.0.dev20190808 and was able to reproduce the issue.Please, find the gist here. Thanks! |
@nguerinjr, For the first two samples, I'm facing an error stating Please find the gist of it here. Thanks! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you. |
@nguerinjr, |
Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks! |
System information
Describe the current behavior
I have a simple test to serialized and deserialize a model which has no compiled loss, just one added with add_loss.
Describe the expected behavior
Correct serialization and deserialization of the code
Code 1 to reproduce the issue
Occurs with both the pure loss function (which on earlier version would return json errors, but now seems ok), but also with the Lambda wrapper.
Code 2 to reproduce the issue
Putting the '.tf' suffix, only changes the error message. Here's an example
I perceived a bunch of errors have been fixed since my last report about this custom uses of keras (#30378). For example, I know a workaround for this, which seems ok in this nightly version, is to use a custom compiled loss, which was not working at that time, as another issue I had reported (#30384)
But, as an extension to these tests, I've noticed the '.tf' version does not work correctly, which seems another related bug:
The real point about my interest in the add_loss it that's the only way, at least I think, to use losses in a flexible way. I still need very flexible losses. add_loss seems an interesting way to do this.
The text was updated successfully, but these errors were encountered: