githubharald / CTCWordBeamSearch

Connectionist Temporal Classification (CTC) decoder with dictionary and language model.

Home Page:https://towardsdatascience.com/b051d28f3d2e

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ivaylojelev opened this issue · comments

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.

Nevermind, I just needed to disable eager execution