Skip to content
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

[freeze_graph] tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef expected inputs '' do not match 1 inputs specified; Op<name=Const; signature= -> output:dtype; attr=value:tensor; attr=dtype:type>; NodeDef: bidirectional_1/while/add/y = Const[dtype=DT_INT32, value=Tensor<type: int32 shape: [] values: 1>](bidirectional_1/while/Switch:1) #2

Open
mdztravelling opened this issue Dec 26, 2019 · 0 comments

Comments

@mdztravelling
Copy link

When I try to freeze TF graph that uses tf.keras layers I get the following exception.

Traceback (most recent call last):
File "/home/ssd1/work/test/melodyExtraction_JDC/python36/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 418, in import_graph_def
graph._c_graph, serialized, options) # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef expected inputs '' do not match 1 inputs specified; Op<name=Const; signature= -> output:dtype; attr=value:tensor; attr=dtype:type>; NodeDef: bidirectional_1/while/add/y = Constdtype=DT_INT32, value=Tensor<type: int32 shape: [] values: 1>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "keras_to_frozen.py", line 111, in
infer(out_filename, input_data)
File "keras_to_frozen.py", line 86, in infer
graph = tf.import_graph_def(graph_def, name="")
File "/home/ssd1/work/test/melodyExtraction_JDC/python36/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
return func(*args, **kwargs)
File "/home/ssd1/work/test/melodyExtraction_JDC/python36/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 422, in import_graph_def
raise ValueError(str(e))
ValueError: NodeDef expected inputs '' do not match 1 inputs specified; Op<name=Const; signature= -> output:dtype; attr=value:tensor; attr=dtype:type>; NodeDef: bidirectional_1/while/add/y = Constdtype=DT_INT32, value=Tensor<type: int32 shape: [] values: 1>

how to resove this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant