Forums - TensorFlow mobilenet Conversion Problem

1 post / 0 new
TensorFlow mobilenet Conversion Problem
richard.lu
Join Date: 26 Oct 16
Posts: 1
Posted: Wed, 2017-12-13 21:24
Hi,
 
With the examples in SNPE SDK 1.8.0, I have converted Inception v3 with retrained model successfully.
 
But when I trying to convert mobilenet retrained pb file(MobileNet_v1_0.25_128), it filed with following error.
 
I am using tensorflow version r1.4.
 
Follow the instructions of SNPE document, I tried to convert the model with the command:
 
snpe-tensorflow-to-dlc --graph optimized_mobilenet_graph.pb --input_dim input 128,128,3 --out_node  final_result --dlc dlc/inception_v3.dlc --allow_unconsumed_nodes
 
And I got the failed log:
 
2017-12-14 09:55:44,391 - 123 - ERROR - Conversion failed: ERROR_TF_CONV_RESOLVE_WEIGHTS: Cannot resolve convolution layer due to missing weights for operation: MobilenetV1/MobilenetV1/Conv2d_13_pointwise/BatchNorm/batchnorm/mul_1
 
Add --verbose get more log
 
2017-12-14 10:23:39,974 - 103 - DEBUG - DEBUG_TF_SCOPE_PRINT: Scope(MobilenetV1/Predictions/Reshape)
2017-12-14 10:23:39,974 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/Predictions/Reshape/shape) [Const])
2017-12-14 10:23:39,974 - 103 - DEBUG - DEBUG_TF_SCOPE_PRINT: Scope(MobilenetV1/Conv2d_0/weights/read)
2017-12-14 10:23:39,974 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/Conv2d_0/weights/read/_82__cf__82) [Const])
2017-12-14 10:23:39,974 - 103 - DEBUG - DEBUG_TF_SCOPE_PRINT: Scope(input)
2017-12-14 10:23:39,974 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(input) [Placeholder])
2017-12-14 10:23:39,974 - 103 - DEBUG - DEBUG_TF_SCOPE_PRINT: Scope(MobilenetV1/MobilenetV1/Conv2d_0/BatchNorm/batchnorm)
2017-12-14 10:23:39,974 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/MobilenetV1/Conv2d_0/BatchNorm/batchnorm/mul_1) [Conv2D])
2017-12-14 10:23:39,974 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/MobilenetV1/Conv2d_0/BatchNorm/batchnorm/add_1) [Add])
2017-12-14 10:23:39,974 - 103 - DEBUG - DEBUG_TF_SCOPE_PRINT: Scope(MobilenetV1/MobilenetV1/Conv2d_0)
2017-12-14 10:23:39,974 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/MobilenetV1/Conv2d_0/Relu6) [Relu6])
2017-12-14 10:23:39,975 - 103 - DEBUG - DEBUG_TF_SCOPE_PRINT: Scope(MobilenetV1/MobilenetV1/Conv2d_1_depthwise)
2017-12-14 10:23:39,975 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/MobilenetV1/Conv2d_1_depthwise/depthwise) [DepthwiseConv2dNative])
2017-12-14 10:23:39,975 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/MobilenetV1/Conv2d_1_depthwise/Relu6) [Relu6])
2017-12-14 10:23:39,975 - 103 - DEBUG - DEBUG_TF_SCOPE_PRINT: Scope(MobilenetV1/MobilenetV1/Conv2d_1_depthwise/BatchNorm/batchnorm)
2017-12-14 10:23:39,975 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/MobilenetV1/Conv2d_1_depthwise/BatchNorm/batchnorm/mul_1) [Mul])
2017-12-14 10:23:39,975 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/MobilenetV1/Conv2d_1_depthwise/BatchNorm/batchnorm/add_1) [Add])
2017-12-14 10:23:39,975 - 103 - DEBUG - DEBUG_TF_SCOPE_PRINT: Scope(MobilenetV1/Conv2d_1_pointwise/weights/read)
2017-12-14 10:23:39,975 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/Conv2d_1_pointwise/weights/read/_76__cf__76) [Const])
2017-12-14 10:23:39,975 - 103 - DEBUG - DEBUG_TF_SCOPE_PRINT: Scope(MobilenetV1/MobilenetV1/Conv2d_1_pointwise/BatchNorm/batchnorm)
2017-12-14 10:23:39,978 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/MobilenetV1/Conv2d_1_pointwise/BatchNorm/batchnorm/mul_1) [Conv2D])
2017-12-14 10:23:39,978 - 105 - DEBUG - DEBUG_TF_OP_NAME_TYPE_PRINT:  Operation(MobilenetV1/MobilenetV1/Conv2d_1_pointwise/BatchNorm/batchnorm/add_1) [Add])
2017-12-14 10:23:39,978 - 103 - DEBUG - DEBUG_TF_SCOPE_PRINT: Scope(MobilenetV1/MobilenetV1/Conv2d_1_pointwise)
....
 
Question:
1. Could the problem be that SNPE 1.8.0 does not support mobilenet convolutions?
2. If SNPE 1.8.0 support mobilenet convolution how to convert?
  • Up0
  • Down0

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.