-
Notifications
You must be signed in to change notification settings - Fork 74k
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
tf2.0 failed to save model if an input is used not used in the model directly #27543
Comments
I could reproduce the issue with TF2.0.0-alpha0 in Google colab. Thanks! |
is there a schedule for this issue to be fixed?? Because I really want this issue to be fixed before 2.0.0a1 so that I can see if there is any further issue in my CI tests. |
Same problem with 1.14.RC1 on colab now. |
@jvishnuvardhan and @k-w-w: Is there any ETA for a fix or any direction so I can contribute for a fix?? Thanks! |
@henrysky As you are interested to contribute, You can raise a PR. Thanks! |
Hi henrysky@ Thanks so much for implementing your fix! Sorry for not updating sooner! I submitted a change that addressed this issue earlier here: 401bbfc#diff-4ee308ea180d49ae81691348531a2b6d |
same issue in 1.14.0 |
It is just a one line patch, you can patch your 1.14.0 like me by yourself |
oh, thank you!
And I use tf.saved_model.save to save the model and there is no error. |
@TachikakaMin What model are you trying to save out (where is b'\n\x03Mul\x12\x03Mul\x1a\x0fconv2d7/Sigmoid\x1a\x0cdepth_result*\x07\n\x01T\x12\x020\x01' coming from?) |
by this it gives error as
|
System information
Describe the current behavior
I have this use case where the model requires multiple inputs and some inputs go into the model layers and some inputs go into the loss function directly. It works fine in the past until I updated my package unit test to tf2.0 to test drive and find out tf2.0 failed test that run fine with tf1.x
I noticed that its mainly due to the tensor that goes directly to the loss function in this case is not presented in
self._network_nodes
in the lineif node_key not in nn.keras_model._network_nodes:
in tensorflow keras network.py.Describe the expected behavior
I expect the model to be saved successfully with tf2.0 just as tf1.x
Code to reproduce the issue
Other info / logs
The text was updated successfully, but these errors were encountered: