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

The Session graph is empty. Add operations to the graph before calling run(). #54

Closed
ivaylojelev opened this issue Apr 13, 2021 · 1 comment

Comments

@ivaylojelev
Copy link

Dear sir,

Thank you for this project. When I try to run the test python code it gives me the following error:

Traceback (most recent call last):
File "testCustomOpv2.py", line 91, in
testMiniExample()
File "testCustomOpv2.py", line 65, in testMiniExample
res = testCustomOp(mat, corpus, chars, wordChars)
File "testCustomOpv2.py", line 15, in testCustomOp
sess.run(tf.compat.v1.global_variables_initializer())
File "/home/ivaylo/.local/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 967, in run
result = self._run(None, fetches, feed_dict, options_ptr,
File "/home/ivaylo/.local/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 1116, in _run
raise RuntimeError('The Session graph is empty. Add operations to the '
RuntimeError: The Session graph is empty. Add operations to the graph before calling run().

It might be worthy to note that I used tf_upgrade_v2 to upgrade to TF 2.0 as this version is no longer supported.

@ivaylojelev
Copy link
Author

Nevermind, I just needed to disable eager execution

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