-
Notifications
You must be signed in to change notification settings - Fork 474
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
Keras model couldn't save #198
Comments
@yzhangswingman : In the next release, we will have a test case that shows how to create saved models from Keras. |
@ramakumar1729 Looking forward to it! Any timeline on the new release? |
@ramakumar1729 Cool, thanks for the update! In my experience, when I serialized BTW, |
@yzhangswingman : Can you share minimum reproducible code for the issue you are facing? Also, it would be great if you can share how to create SavedModels with sparse tensor inputs. |
@ramakumar1729 sure, I will get back to you later with some code and stuff |
@ramakumar1729 I've tried to save tfr keras model follow this commit, but failed. Errors are shown as below: ValueError: If specifying TensorSpec names for nested structures, either zero or all names have to be specified. The reproducible code in cloab is here Thanks~ |
@yzhangswingman @AlexanderJLiu : Right, this issue that comes up as the features are sparse (query, document). That is why I added a TODO that the saved model works only for dense features currently. |
@ramakumar1729 Thanks, I didn't notice the |
@ramakumar1729 @AlexanderJLiu
The exported forward pass function however expects all inputs to be dense
|
@ramakumar1729 Here's the other error in reconstructing
|
This error seems to have been resolved in the latest Tensorflow build. I had the same issue, but installing tf-nightly and tf-estimator-nightly resolved it. |
Thanks @TalhaAsmal ! @yzhangswingman : Does this resolve your issue? |
@ramakumar1729: yeah, TF2.1/2.3 + TFR0.3.1 are good enough for the moment. Thanks! |
platform: (CoLab) uname_result(system='Linux', node='1acc1ece6828', release='4.19.104+', version='#1 SMP Wed Feb 19 05:26:34 PST 2020', machine='x86_64', processor='x86_64')
python==3.6.9
tensorflow==2.1.0
tensorflow-ranking==0.3.0
TFRanking custom Keras layers can serialize and deserialize but the custom model failed saving to either saved_model or h5 format. Could there be any issues with
get_config
implementations?The text was updated successfully, but these errors were encountered: