Models: load frozen graph of SSD_Mobilenet model. No op named NonMaxSuppressionV3 in defined operations.

Created on 16 Aug 2018  Â·  3Comments  Â·  Source: tensorflow/models

What is the top-level directory of the model you are using:
models/research

Have I written custom code
I copied the code in object_detection_tutorial.ipynb and changed the directories for input files
note that I'm using a frozen graph trained from scratch and also based on a single class customized dataset. the model I was using is SSD_mobilenet_v2

OS Platform and Distribution
windows 10

TensorFlow installed from
cpu version 1.6.0, installed from pip

Bazel version
N/A

CUDA/cuDNN version
N/A

GPU model and memory
N/A

Exact command to reproduce
just copy the code in python object_detection_tutorial and run the code as a python file

Problem description:
Using tensorflow object detection api, I trained a ssd_mobilenet_v2 model using customed dataset and exported a frozen_inference_graph from ckpt files. the result of checkpoint has nothing wrong on tensorboard. However, when I tried to load the my frozen_inference_graph.pb as shown in the object_detection_tutorial.ipynb, I have errors as follows:

File "", line 1, in
tf.import_graph_def(od_graph_def, name='')

File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\libsite-packages\tensorflowpython\util\deprecation.py", line 432, in new_func
return func(args, *kwargs)

File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\libsite-packages\tensorflowpython\framework\importer.py", line 540, in import_graph_def
raise ValueError('No op named %s in defined operations.' % node.op)

ValueError: No op named NonMaxSuppressionV3 in defined operations.

the error lead me to the import_graph_def() function in the importer.py, yet I found nothing about NonMaxSuppressionV3.
could that be tensorflow version problem? please help, thanks.

updated:
I searched all the node names in the frozen graph and found the path caused the ValueError:
Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/non_max_suppression/NonMaxSuppressionV3

Any help will be appreciated.

awaiting response

Most helpful comment

@yhliang2018
I updated the tensorflow version to 1.8.0 and the problem is solved. It seems that tensorflow of version 1.6.0 and before only have NonMaxSuppression and NonMaxSuppressionV2 in the operation dictionary called 'op_dict', thus when import the frozen graph using tf.import_graph_def(od_graph_def, name='') will generate that ValueError.

issue closed, thanks.

All 3 comments

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
What is the top-level directory of the model you are using
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

@yhliang2018
I updated the tensorflow version to 1.8.0 and the problem is solved. It seems that tensorflow of version 1.6.0 and before only have NonMaxSuppression and NonMaxSuppressionV2 in the operation dictionary called 'op_dict', thus when import the frozen graph using tf.import_graph_def(od_graph_def, name='') will generate that ValueError.

issue closed, thanks.

@yhliang2018
I updated the tensorflow version to 1.8.0 and the problem is solved. It seems that tensorflow of version 1.6.0 and before only have NonMaxSuppression and NonMaxSuppressionV2 in the operation dictionary called 'op_dict', thus when import the frozen graph using tf.import_graph_def(od_graph_def, name='') will generate that ValueError.

issue closed, thanks.

hello, can you send me an tensorflow/models to my email at [email protected], thank you very much!

Was this page helpful?
0 / 5 - 0 ratings