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

Run error #17

Open
NoozAbooz opened this issue Oct 10, 2020 · 3 comments
Open

Run error #17

NoozAbooz opened this issue Oct 10, 2020 · 3 comments

Comments

@NoozAbooz
Copy link

File "app.py", line 62, in <module> saver = tf.compat.v1.train.import_meta_graph(model) File "C:\Users\Michael\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\training\saver.py", line 1460, in import_meta_graph return _import_meta_graph_with_return_elements(meta_graph_or_file, File "C:\Users\Michael\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\training\saver.py", line 1472, in _import_meta_graph_with_return_elements raise RuntimeError("Exporting/importing meta graphs is not supported when " RuntimeError: Exporting/importing meta graphs is not supported when eager execution is enabled. No graph exists when eager execution is enabled.

@Aroueterra
Copy link

@mobilegmyt
I'm guessing you have Tensorflow version 2+ installed?

You will need to disable eager execution for this to work, in addition to the compatibility with version 1.

Like so:

import tensorflow.compat.v1 as tf
tf.compat.v1.disable_eager_execution()

@NoozAbooz
Copy link
Author

@mobilegmyt
I'm guessing you have Tensorflow version 2+ installed?

You will need to disable eager execution for this to work, in addition to the compatibility with version 1.

Like so:

import tensorflow.compat.v1 as tf
tf.compat.v1.disable_eager_execution()

I also got

Traceback (most recent call last):
  File "C:\Users\mobilegmYT\Downloads\web-omr-master\app.py", line 51, in <module>
    tf.reset_default_graph()
AttributeError: module 'tensorflow' has no attribute 'reset_default_graph'

@Aroueterra
Copy link

Make sure that the line is using the compat.v1 alias.

Did you try tf.compat.v1.reset_default_graph()?

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

2 participants