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

ValueError: Node 'Preprocessor/map/TensorArray_2': Unknown input node 'Preprocessor/map/strided_slice' #20

Open
David-Lee-1990 opened this issue Jun 5, 2018 · 1 comment

Comments

@David-Lee-1990
Copy link

David-Lee-1990 commented Jun 5, 2018

@gustavz
Hi, I am new to tensorflow. I trained Tensorflow's object detection api with my own data using ssd_mobilenet_v2_coco model. When I use this 'realtime_object_detection' code, I get the error stated as follows:

File "run_objectdetection.py", line 178, in <module> config.NUM_CLASSES,config.SPLIT_MODEL, config.SSD_SHAPE).prepare_od_model() File "D:\realtime_object_detection_2\rod\model.py", line 163, in prepare_od_model self.load_frozenmodel() File "D:\realtime_object_detection_2\rod\model.py", line 135, in load_frozenmodel tf.import_graph_def(remove, name='') File "C:\Users\bubblelab\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\util\deprecation.py", line 432, in new_func return func(*args, **kwargs) File "C:\Users\bubblelab\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\importer.py", line 493, in import_graph_def raise ValueError(str(e)) *ValueError: Node 'Preprocessor/map/TensorArray_2': Unknown input node 'Preprocessor/map/strided_slice'*

The error comes from the model.py file line 130 when importing remove graph:
` keep = graph_pb2.GraphDef()
for n in nodes_to_keep_list:
keep.node.extend([copy.deepcopy(name_to_node_map[n])])

                remove = graph_pb2.GraphDef()
                remove.node.extend([score_def])
                remove.node.extend([expand_def])
                for n in nodes_to_remove_list:
                    remove.node.extend([copy.deepcopy(name_to_node_map[n])])

                with tf.device('/gpu:0'):
                    tf.import_graph_def(keep, name='')
                with tf.device('/cpu:0'):
                    tf.import_graph_def(remove, name='')`

I checked that the node named "Preprocessor/map/strided_slice" is really in the frozenmodel:
name: "Preprocessor/map/strided_slice" op: "StridedSlice" input: "Preprocessor/map/Shape" input: "Preprocessor/map/strided_slice/stack" input: "Preprocessor/map/strided_slice/stack_1" input: "Preprocessor/map/strided_slice/stack_2" attr { key: "Index" value { type: DT_INT32 } } attr { key: "T" value { type: DT_INT32 } } attr { key: "begin_mask" value { i: 0 } } attr { key: "ellipsis_mask" value { i: 0 } } attr { key: "end_mask" value { i: 0 } } attr { key: "new_axis_mask" value { i: 0 } } attr { key: "shrink_axis_mask" value { i: 1 } }

i found there is another node named 'Preprocessor/map/TensorArray_1' also has the node 'Preprocessor/map/strided_slice' as its input:

name: "Preprocessor/map/TensorArray_1" op: "TensorArrayV3" input: "Preprocessor/map/strided_slice" attr { key: "clear_after_read" value { b: true } } attr { key: "dtype" value { type: DT_FLOAT } } attr { key: "dynamic_size" value { b: false } } attr { key: "element_shape" value { shape { unknown_rank: true } } } attr { key: "identical_element_shapes" value { b: true } } attr { key: "tensor_array_name" value { s: "" } }

I can not fix this error. Any help would be appreciated!

@gustavz
Copy link
Owner

gustavz commented Jun 6, 2018

see #10

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