With the examples in SNPE SDK, I have modified and tested SNPE w/ MobileNet and Inception v1 successfully.
But I failed when I tried to convert Faster RCNN/MobileNet-SSD Models.
The pretrained models are listed here: https://github.com/GoogleCloudPlatform/tensorflow-object-detection-example
http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_...
http://download.tensorflow.org/models/object_detection/faster_rcnn_resne...
Follow the instructions of SNPE document, I tried to convert the model with the command:
snpe-tensorflow-to-dlc --graph ./ssd_mobilenet_v1_coco_11_06_2017/frozen_inference_graph.pb --dlc ssd_mobilenet_v1_coco_11_06_2017.dlc -i image_tensor 300,300,3 --out_node detection_boxes --out_node detection_scores --out_node detection_classes --out_node num_detections
And I got the failed log:
OUTPUT LOG:
2017-08-01 15:12:03.151858: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-08-01 15:12:03.151878: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-08-01 15:12:03.151896: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-08-01 15:12:03.151900: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-08-01 15:12:03.151905: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
2017-08-01 15:12:04,845 - 125 - ERROR - Encountered Error: maximum recursion depth exceeded in cmp
Traceback (most recent call last):
File "/home/champ/workspace/snpe-1.2.2/bin/x86_64-linux-clang/snpe-tensorflow-to-dlc", line 118, in main
converter = DlcConverter(model, not args.allow_unconsumed_nodes)
File "/home/champ/workspace/snpe-1.2.2/lib/python/converters/tensorflow/converter.py", line 309, in __init__
self._ops = self._get_graph_operations(model)
File "/home/champ/workspace/snpe-1.2.2/lib/python/converters/tensorflow/converter.py", line 446, in _get_graph_operations
nodes = cls._filter_graph_nodes(model.graph_def.node, i.name, out_node_name)
File "/home/champ/workspace/snpe-1.2.2/lib/python/converters/tensorflow/converter.py", line 492, in _filter_graph_nodes
cls._create_sorted_node_input_graph(nodes_map, out_node, ordered_nodes_map)
File "/home/champ/workspace/snpe-1.2.2/lib/python/converters/tensorflow/converter.py", line 517, in _create_sorted_node_input_graph
cls._create_sorted_node_input_graph(nodes_map, input_node, ordered_nodes_map)
...
File "/home/champ/workspace/snpe-1.2.2/lib/python/converters/tensorflow/converter.py", line 514, in _create_sorted_node_input_graph
if input_node_name not in nodes_map or input_node_name in ordered_nodes_map:
RuntimeError: maximum recursion depth exceeded in cmp
Did I miss something or Did I do something wrong?
Please see https://developer.qualcomm.com/forum/qdn-forums/software/snapdragon-neur...
Snapdragon NPE SDK 1.2.2 does not support conversion of Faster RCNN/MobileNet-SSD Models. Not all needed layers are suported. We will be adding that capability in future SDK releases. You can consider using User Defined Layer (UDL) feature of the SDK to enable currently unsupported layers, but note that UDL is currently meant primarily for prototyping and using it will have implications on runtime performance.
Thanks.
Could you tell me how to convert MobileNet? Some error like this:
2017-08-17 17:28:17,244 - 388 - WARNING - WARNING_TF_SCOPE_OP_NOT_CONSUMED: Scope (MobilenetV1/MobilenetV1/Conv2d_0) operation(s) not consumed by converter: [u'Relu6'].
Thank you.
Hey @moljaca
I got the same error while converting mobilenet pb graph to dlc.
Runtime Error: maximum recursion depth exceeded in cmp.
As you suggested to use UDL, there's a snpe-caffe-to-dlc-udl but not for tensorflow. Could you guide me here how to go further?
Thanks.
Hi all,
I would like to know the same udl conversion for tensorflow.
Any suggestion from qualcomm snpe team would be helpful.
Thanks and regards
vishal
Hi,
as it stands, UDL example code in SDK needs fixing. We will need to do that first. Porting UDL specifics from snpe-caffe-to-dlc-udl example to tensorflow should be pretty straight forward. We will provide guidance once we fix udl example.
Thanks
Hi moljaca,
Can you tell me what the layers in SSD that are not supported? In my opinion, there are't especial layer in SSD compared to YOLO, which can be converted to dlc file successfully.
PriorBox layers are not supported.
Hi moljaca,
Can you tell me when will the example of using udl with tensorflow be available?
Thanks
Hi @zl1994
Could you tell me how to convert YOLO? Are you using caffe or tensorflow?
are you resolve the problem