TannerGilbert / Tutorials

Code for some of my articles

Home Page:https://gilberttanner.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object Dectection Notebook: The operation, 'image_tensor', does not exist in the graph.

hemaAI opened this issue · comments

commented

I followed your whole tutorial and it worked until I tried to reference my frozenmodel in the notebook. In the last step the output is: ""The name 'image_tensor:0' refers to a Tensor which does not exist. The operation, 'image_tensor', does not exist in the graph.""

Can you help?

Hello @hemaAI, did you found a solution? I have also the same issue

commented

I think it was another tensor name. You have to print out your tensor names.
In my case it was something like input_tensor instead of image tensor.

When i displayed all tensors names, i found one with "input" as name but i used it i got this error:
Cannot feed value of shape (1, 576, 768, 3) for Tensor 'input:0', which has shape '(?, 299, 299, 3)'

commented

thats exactly where I ended up and did not find a solution...

Sorry for not replying. It seems like there are multiple things that can trigger this issue.

For some people replacing:
image_tensor = tf.get_default_graph().get_tensor_by_name('image_tensor:0')
with:
image_tensor = 'image_tensor:0'
solved the problem.

I will close this issue for now. If anyone experiences any further issues feel free to reopen it.