Open hjl-2548951848 opened 3 years ago
I have the same problem "graph." % (repr(name), repr(op_name))) KeyError: "The name 'net/images:0' refers to a Tensor which does not exist. The operation, 'net/images', does not exist in the graph."
请问你们邮解决这个问题吗
What version of tensorflow are you guys using? the issue might be due to mismatch in the version of TF that the model is built and the one that you are using.
张量不一样了,把net/去掉就可以了
Replace the following lines in the generate_detections.py wlth the ones below.
self.input_var = tf.compat.v1.get_default_graph().get_tensor_by_name("net/%s:0" % input_name)
self.output_var = tf.compat.v1.get_default_graph.get_tensor_by_name("net/%s:0" % output_name)
# For TF v2.0 and above
self.input_var = tf.compat.v1.get_default_graph().get_tensor_by_name( "%s:0" % input_name)
self.output_var = tf.compat.v1.get_default_graph().get_tensor_by_name( "%s:0" % output_name)
Basically just remove net/ in the API call.
You could also do it like this.add follow line uner import tensorflow as tf ,tf.compat.v1.disable_eager_execution()
I have the same problem