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

KeyError: "correlation" #71

Open
David3310273 opened this issue Dec 23, 2019 · 1 comment
Open

KeyError: "correlation" #71

David3310273 opened this issue Dec 23, 2019 · 1 comment

Comments

@David3310273
Copy link

Hello, I want to get the output flow images from your CSS_ft model, the code I wrote is showing below:

import tensorflow as tf
import os

ckpt_path = "~/UnFlow/logs/CSS_ft"

with tf.Session() as sess:
    saver = tf.train.import_meta_graph(os.path.join(ckpt_path, "model.ckpt.meta"))
    saver.restore(sess, tf.train.latest_checkpoint(ckpt_path))
    print("finished!")

when I execute the code, it shows the error like this:

Traceback (most recent call last):
  File "export_endovis.py", line 8, in <module>
    saver = tf.train.import_meta_graph(os.path.join(ckpt_path, "model.ckpt.meta"))
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1435, in import_meta_graph
    meta_graph_or_file, clear_devices, import_scope, **kwargs)[0]
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1457, in _import_meta_graph_with_return_elements
    **kwargs))
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/meta_graph.py", line 806, in import_scoped_meta_graph_with_return_elements
    return_elements=return_elements)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py", line 399, in import_graph_def
    _RemoveDefaultAttrs(op_dict, producer_op_list, graph_def)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py", line 159, in _RemoveDefaultAttrs
    op_def = op_dict[node.op]
KeyError: 'Correlation'

please help me out, thanks!

@simonmeister
Copy link
Owner

It looks like the Correlation op was not compiled. Did you run the run.py script? This is needed for some initialization, including op compilation. Note that you may need to use an old version of tensorflow for compilation to work.

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