Failed to load model with scalar inputs #35446
Labels
comp:keras
Keras related issues
TF 2.0
Issues relating to TensorFlow 2.0
type:support
Support issues
Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template
System information
You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with: 1. TF 1.0:
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
2. TF 2.0:python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the current behavior
I defined a model with two inputs: one of shape
(seq_len, fea_size)
, and the other of shape()
.It is fine while training and saving the model, but it gets failed when loading the model from the export directory, with error show like this:
And as I have hacked the tensorflow source code, I found the bug comes from here training_utils.ModelInputs.get_symbolic_inputs
Describe the expected behavior
Code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
The code showed above performs as expected on 2.1.0-rc1
The text was updated successfully, but these errors were encountered: