Forums - TensorFlow ssd mobilenet v2 coco model convert error on snpe 1.17.0

2 posts / 0 new
Last post
TensorFlow ssd mobilenet v2 coco model convert error on snpe 1.17.0
peggy_lin
Join Date: 18 Jul 18
Posts: 1
Posted: Wed, 2018-07-25 22:36

I'm trying to convert a TensorFlow model, yet there seems to be an error with the shape

and the shape mentioned does not belong to either the input or the output layers.

Does anyone know how to properly convert a V2 ssd-mobilenet model?

Please see below for detailed information of how I convert, thank you.

SNPE SDK:

snpe-1.17.0

MODEL:
ssd_mobilenet_v2_coco  
(from source: https://github.com/tensorflow/models/blob/master/research/object_detecti...)

COMMAND:
snpe-tensorflow-to-dlc 
    --graph ssd_mobilenet_v1_coco_2018_01_28/frozen_inference_graph.pb 
    -i Preprocessor/sub 1, 300, 300, 3 
    --out_node detection_classes 
    --out_node detection_boxes 
    --out_node detection_scores 
    --dlc ssd_mobilenet_v1_coco_2018_01_28.dlc 
    --allow_unconsumed_nodes
 
ERROR MESSAGE:
ERROR - Encountered Error: non-broadcastable output operand with shape (75,75,24) doesn't match the broadcast shape (1,75,75,24)
Traceback (most recent call last):
  File "/host/snpe-1.15.0/bin/x86_64-linux-clang/snpe-tensorflow-to-dlc", line 120, in main
    converter.convert(args.dlc, args.model_version, converter_command)
  File "/host/snpe-1.15.0/lib/python/converters/tensorflow/converter.py", line 304, in convert
    self._convert_layers()
  File "/host/snpe-1.15.0/lib/python/converters/tensorflow/converter.py", line 340, in _convert_layers
    descriptors = self._resolve_descriptors_from_nodes(graph_ops)
  File "/host/snpe-1.15.0/lib/python/converters/tensorflow/converter.py", line 439, in _resolve_descriptors_from_nodes
    resolved_descriptors = resolver.resolve_layer(graph_matcher, self._graph_helper)
  File "/host/snpe-1.15.0/lib/python/converters/tensorflow/layers/eltwise.py", line 97, in resolve_layer
    const_tensor = self._broadcast_tensor(const_tensor, eltwise_shape)
  File "/host/snpe-1.15.0/lib/python/converters/tensorflow/layers/eltwise.py", line 127, in _broadcast_tensor
    broadcasted_tensor += tensor
ValueError: non-broadcastable output operand with shape (75,75,24) doesn't match the broadcast shape (1,75,75,24)

 

  • Up0
  • Down0
gesqdn-forum
Join Date: 4 Nov 18
Posts: 184
Posted: Tue, 2019-10-22 04:23
Hi,
 
SNPE team has provided the documents explaining clearly on how to convert a Tensorflow Mobilenet SSD frozen graphs into dlc format. You can refer the below link for the same.
 
Hope this will help you!
Thank you.
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.