Forums - Failed to convert the tensorflow model to dlc with SNPE tool

2 posts / 0 new
Last post
Failed to convert the tensorflow model to dlc with SNPE tool
qi.yao
Join Date: 5 Dec 17
Posts: 1
Posted: Wed, 2017-12-06 19:35

Hi, 

We are using SNPE1.8.0 SDK now and trying to convert the tensorflow model to DLC, then port to Android device.

We try serveral network models including inceptionV3, MTCNN model and others. Some ones are OK, we can manager to convert these models into DLC format, like inceptionV3, but some of others are not, we got the errors like:

snpe-tensorflow-to-dlc --graph MTCNN.pb  \
--input_dim  pnet/input 12,12,3 --out_node pnet/conv4-2/BiasAdd --out_node pnet/prob1 \
--input_dim  rnet/input 24,24,3 --out_node rnet/conv5-2/conv5-2 --out_node rnet/prob1 \
--input_dim  onet/input 48,48,3 --out_node onet/conv6-2/conv6-2 --out_node onet/conv6-3/conv6-3 \
--dlc mtcnn.dlc --allow_unconsumed_nodes --verbose
 
After running the command above, then we got information showing blow, it shows conversion failed.
 
2017-12-05 15:43:30,492 - 308 - WARNING - WARNING_TF_SCOPE_OP_NOT_CONSUMED: Operation (Classifer/sscore/BiasAdd) not consumed by converter: BiasAdd.
2017-12-05 15:43:30,748 - 393 - INFO - INFO_ALL_BUILDING_LAYER_W_NODES: Building layer (Convolution) with nodes: [u'conv0/Conv2D']
2017-12-05 15:43:30,757 - 393 - INFO - INFO_ALL_BUILDING_LAYER_W_NODES: Building layer (Convolution) with nodes: [u'convBlock-1/conv1/Conv2D']
2017-12-05 15:43:30,766 - 393 - INFO - INFO_ALL_BUILDING_LAYER_W_NODES: Building layer (Concatenation) with nodes: [u'sizeMap/concat']
2017-12-05 15:43:30,774 - 123 - ERROR - Conversion failed: ERROR_TF_CONCAT_INPUT: Concatenation layer requires at least two inputs.
 
Do you have any idea? 
  • Up0
  • Down0
dmarques
Join Date: 15 Sep 17
Posts: 27
Posted: Thu, 2017-12-07 11:06

Make sure that the operation "sizeMap/concat" inputs from the tensorflow graph are being converted as part of a layer. You seem to have a bias add operation not being converted properly as per:

2017-12-05 15:43:30,492 - 308 - WARNING - WARNING_TF_SCOPE_OP_NOT_CONSUMED: Operation (Classifer/sscore/BiasAdd) not consumed by converter: BiasAdd.

 

  • 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.