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

Error in object_detection_tutorial.ipynb:u'TensorArrayV3' #1603

Closed
grapefruitXLJ opened this issue Jun 19, 2017 · 16 comments
Closed

Error in object_detection_tutorial.ipynb:u'TensorArrayV3' #1603

grapefruitXLJ opened this issue Jun 19, 2017 · 16 comments
Labels
stat:awaiting model gardener Waiting on input from TensorFlow model gardener

Comments

@grapefruitXLJ
Copy link

grapefruitXLJ commented Jun 19, 2017

Something wrong in the cell "Load a (frozen) Tensorflow model into memory":
OS: Ubuntu 16.04.2
TensorFlow Version: 1.2.0

source code:
detection_graph = tf.Graph()
with detection_graph.as_default():
od_graph_def = tf.GraphDef()
with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid:
serialized_graph = fid.read()
od_graph_def.ParseFromString(serialized_graph)
tf.import_graph_def(od_graph_def, name='')


KeyError Traceback (most recent call last)
in ()
5 serialized_graph = fid.read()
6 od_graph_def.ParseFromString(serialized_graph)
----> 7 tf.import_graph_def(od_graph_def, name='')

/home/su/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/importer.pyc in import_graph_def(graph_def, input_map, return_elements, name, op_dict, producer_op_list)
256 for node in graph_def.node:
257 # Set any default attr values that aren't present.
--> 258 op_def = op_dict[node.op]
259 for attr_def in op_def.attr:
260 key = attr_def.name
KeyError: u'TensorArrayV3'

@IvonaTau
Copy link

IvonaTau commented Jun 19, 2017

Hi , I also get the same error on MacOS Sierra and Tensorflow 1.2.0. However It seems related only to Python 2 as when notebook is run with Python 3 kernel all is fine.

@tatatodd
Copy link

Can you comment on this @derekjchow? Based on @IvonaTau's comment, perhaps this is related (but different) from #1597?

@tatatodd tatatodd added the stat:awaiting model gardener Waiting on input from TensorFlow model gardener label Jun 20, 2017
@Prakash19921206
Copy link

try installing python 3.5

@derekjchow
Copy link
Contributor

Could you also provide information on what model you're running?

This could also be based on the anaconda version you're running. I've tested on vanilla python2&3 with tensorflow 1.2 on Ubuntu 16.04 and have not seen this issue.

@tmd1wkd
Copy link

tmd1wkd commented Jun 29, 2017

I also have the same error!
I'm running object detection model..
My env is Ubuntu 16.04.1 / Anaconda 4.3.22 / Python 3.5.3
jupyter==1.0.0 / tensorflow==0.10.0

Load a (frozen) Tensorflow model into memory.

KeyError Traceback (most recent call last)
in ()
5 serialized_graph = fid.read()
6 od_graph_def.ParseFromString(serialized_graph)
----> 7 tf.import_graph_def(od_graph_def, name='')

~/anaconda3/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/framework/importer.py in import_graph_def(graph_def, input_map, return_elements, name, op_dict, producer_op_list)
250 for node in graph_def.node:
251 # Set any default attr values that aren't present.
--> 252 op_def = op_dict[node.op]
253 for attr_def in op_def.attr:
254 key = attr_def.name

KeyError: 'TensorArrayV3'

@thirdperspective
Copy link

I am also facing same problem in the environment(ubuntu 14,python 2.7,tensorflow 0.12.1).
In windows environment(windows10,python 3.5,tensorflow 1.1.0,jupyter), it is working fine.

Error log:
tf.import_graph_def(od_graph_def, name='')
File "/usr/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/importer.py", line 258, in import_graph_def
op_def = op_dict[node.op]
KeyError: u'TensorArrayV3'

@jackfan00
Copy link

same error in ubuntu 16.04 python 2.7.12 tensroflow 0.12.0-rc0


KeyError Traceback (most recent call last)
in ()
5 serialized_graph = fid.read()
6 od_graph_def.ParseFromString(serialized_graph)
----> 7 tf.import_graph_def(od_graph_def, name='')

/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/importer.pyc in import_graph_def(graph_def, input_map, return_elements, name, op_dict, producer_op_list)
256 for node in graph_def.node:
257 # Set any default attr values that aren't present.
--> 258 op_def = op_dict[node.op]
259 for attr_def in op_def.attr:
260 key = attr_def.name

KeyError: u'TensorArrayV3'

@jtdowdall
Copy link

I got the same error in ubuntu 14.04.5. I realized I forgot to use my virtualenv for the python notebook (http://ipython.readthedocs.io/en/stable/install/kernel_install.html).

My python3 was using tf 0.12.1 and giving me the error, my virtualenv has tf 1.2.1 and runs fine.

Make sure your tensorflow version is up to date.

@jackfan00
Copy link

after kernel install , my virtualenv has tf 1.2.1 and runs fine.

@kaskavalci
Copy link

I receive this error on romilly/rpi-docker-tensorflow docker image on raspberry pi. Python 2.7.9 on Linux 1f7d8ec308e5 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

@planetceres
Copy link

Also seeing same error on:

MacOS Sierra 10.12.6
Tensorflow version 1.3.0
Python: 3.5.4 (also tried 3.6.0)
Anaconda 4.3.22

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-7-0e97fbc26e6d> in <module>()
      5     serialized_graph = fid.read()
      6     od_graph_def.ParseFromString(serialized_graph)
----> 7     tf.import_graph_def(od_graph_def, name='')

/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/framework/importer.py in import_graph_def(graph_def, input_map, return_elements, name, op_dict, producer_op_list)
    256     for node in graph_def.node:
    257       # Set any default attr values that aren't present.
--> 258       op_def = op_dict[node.op]
    259       for attr_def in op_def.attr:
    260         key = attr_def.name

KeyError: 'TensorArrayV3'

@planetceres
Copy link

I found this worked after updating tensorflow in the root environment. The Anaconda kernel showed tensorflow 1.3.0, but the root environment was at 1.0.1.

The tutorial apparently needs tensorflow >= 1.2.0.

@ngochuancst
Copy link

with your error? You should prepare the following libraries and note some things .

  1. Are you sure you are building on any python version? python 2.7 or python 3.6
  2. check tensorflow version, and needs tensorflow >= 1.2.0. and how to install or upgrade then you can search.
  3. You need to prepare all the files for pythonc to be able to build. If you refer to it at https://github.com/tensorflow/models/tree/master/research/object_detection.
    4.You modify the file path and variables in the previous program to match before building
  4. good luck

@NoMoreHiding27
Copy link

How can I remove the KeyError: TensorArrayV3

@gw00207
Copy link

gw00207 commented Jun 25, 2018

I also get this error, with tensorflow 1.7:

File "/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 227, in _RemoveDefaultAttrs
op_def = op_dict[node.op]

KeyError: 'GRUBlockCell'

@cdlwhm1217096231
Copy link

I facing the same problem,please help me thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting model gardener Waiting on input from TensorFlow model gardener
Projects
None yet
Development

No branches or pull requests