Forums - Inception V2 weights have wrong number of input channels

6 posts / 0 new
Last post
Inception V2 weights have wrong number of input channels
sipi_s
Join Date: 2 Oct 17
Posts: 2
Posted: Fri, 2017-12-01 03:04

Hi!

I've been trying to convert Inception V2 image classification model from Tensorflow's slim library (https://github.com/tensorflow/models/tree/master/research/slim) but get an error on first two convolutional layers saying that weights have wrong number of input channels.

Input command:
snpe-tensorflow-to-dlc --graph inception_v2_frozen.pb -i input 224,224,3 --dlc inception2.dlc --out_node InceptionV2/Predictions/Reshape_1 --allow_unconsumed_nodes
 
Output:
<SNPE_ROOT>/lib/python/converters/tensorflow/layers/convolution.py:229: RuntimeWarning: error_code=1002; error_message=Layer paramter value is invalid. Layer InceptionV2/InceptionV2/Conv2d_1a_7x7/separable_conv2d/depthwise: weights have wrong number of input channels; error_component=Model Validation; line_no=587; thread_id=140066145076992
  groups=descriptor.groups)
<SNPE_ROOT>/lib/python/converters/tensorflow/layers/convolution.py:229: RuntimeWarning: error_code=1002; error_message=Layer paramter value is invalid. Layer InceptionV2/InceptionV2/Conv2d_1a_7x7/separable_conv2d: weights have wrong number of input channels; error_component=Model Validation; line_no=587; thread_id=140066145076992
  groups=descriptor.groups)
 
It does manage to output a DLC file but it fails with the same error when trying to use it with snpe-net-run
 
SDK version used: 1.8.0 (though same error has been happening since 1.2.2)
 
Thanks.
 
 
 

 

  • Up0
  • Down0
dmarques
Join Date: 15 Sep 17
Posts: 27
Posted: Thu, 2017-12-07 12:25

Please verify if any unconsumed operations are logged during conversion. IT would be helpful if you can provide a minimal graph which reproduces the issue so we can further analyse.

  • Up0
  • Down0
demo-name
Join Date: 26 Jan 18
Posts: 8
Posted: Tue, 2018-03-13 08:28

I'm seeing a similar issue with snpe 1.13.0

Setup:

Download and follow setup instructions here: https://developer.qualcomm.com/software/snapdragon-neural-processing-eng...

Download stock ssd inception v2: http://download.tensorflow.org/models/object_detection/ssd_inception_v2_...

Run: snpe-tensorflow-to-dlc --graph ssd_inception_v2_coco_2017_11_17/frozen_inference_graph.pb -i Preprocessor/sub 300,300,3 --out_node detection_classes --out_node detection_boxes --out_node detection_scores --dlc ssd_inception_v2_coco_2017_11_17/ssd_inception_v2_coco.dlc --allow_unconsumed_node

/projects/snpe-sdk/snpe-1.13.0/lib/python/converters/tensorflow/layers/convolution.py:336: RuntimeWarning: error_code=1002; error_message=Layer paramter value is invalid. Layer FeatureExtractor/InceptionV2/InceptionV2/Conv2d_1a_7x7/separable_conv2d/depthwise: weights have wrong number of input channels; error_component=Model Validation; line_no=587; thread_id=140033133233984

  groups=descriptor.groups)
/projects/snpe-sdk/snpe-1.13.0/lib/python/converters/tensorflow/layers/convolution.py:336: RuntimeWarning: error_code=1002; error_message=Layer paramter value is invalid. Layer FeatureExtractor/InceptionV2/InceptionV2/Conv2d_1a_7x7/separable_conv2d: weights have wrong number of input channels; error_component=Model Validation; line_no=587; thread_id=140033133233984
  groups=descriptor.groups)
 
A dlc file is generated but if tried to run the app cannot load the network.
 
Any suggestions on how to get this working?
 
Thanks
 
  • Up0
  • Down0
emanuele.colucci
Join Date: 26 Jul 17
Posts: 2
Posted: Mon, 2018-06-04 08:33

Hi there, 

I'm getting the same errors reported above. Are there updates about a working example about converting ssd-inception_v2 tensorflow graph into a dlc model?

 

Thank you.

  • Up0
  • Down0
emanuele.colucci
Join Date: 26 Jul 17
Posts: 2
Posted: Mon, 2018-06-04 08:34

Hi there, 

I'm getting the same errors reported above. Are there updates about a working example about converting ssd-inception_v2 tensorflow graph into a dlc model?

 

Thank you.

  • Up0
  • Down0
sanjay.1987saini
Join Date: 6 Aug 19
Posts: 6
Posted: Sun, 2020-04-05 00:41
Similar error while converting ssd_inception_v2_coco_2018_01_28 detection model into dlc. 
 
2020-04-05 12:59:26,234 - 411 - WARNING - ERROR_TF_FALLBACK_TO_ONDEMAND_EVALUATION: Unable to resolve operation output shapes in single pass. Using on-demand evaluation!
2020-04-05 12:59:26.751934: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
/home/saini/workspace/SNPE/snpe-1.30.0.480/lib/python/snpe/converters/tensorflow/layers/convolution.py:381: RuntimeWarning: error_code=1002; error_message=Layer paramter value is invalid. Layer FeatureExtractor/InceptionV2/InceptionV2/Conv2d_1a_7x7/separable_conv2d/depthwise: weights have wrong number of input channels; error_component=Model Validation; line_no=967; thread_id=139726119126848
  groups=descriptor.groups)
/home/saini/workspace/SNPE/snpe-1.30.0.480/lib/python/snpe/converters/tensorflow/layers/convolution.py:381: RuntimeWarning: error_code=1002; error_message=Layer paramter value is invalid. Layer FeatureExtractor/InceptionV2/InceptionV2/Conv2d_1a_7x7/separable_conv2d: weights have wrong number of input channels; error_component=Model Validation; line_no=967; thread_id=139726119126848
  groups=descriptor.groups)
/home/saini/workspace/SNPE/snpe-1.30.0.480/lib/python/snpe/converters/tensorflow/layers/ssd.py:230: RuntimeWarning: error_code=1000; error_message=Layer is not supported. Layer Postprocessor/Decode/transpose_1:0 of type BoxDecoder not supported by GPU runtime; error_component=Model Validation; line_no=339; thread_id=139726119126848
  scale_w=descriptor.scale_w)
/home/saini/workspace/SNPE/snpe-1.30.0.480/lib/python/snpe/converters/tensorflow/layers/crop.py:69: RuntimeWarning: error_code=802; error_message=Layer parameter value is invalid in GPU. Layer Postprocessor/Slice:0: last offset must be multiple of four; error_component=GPU Runtime; line_no=122; thread_id=139726119126848
  descriptor.output_names[0])
/home/saini/workspace/SNPE/snpe-1.30.0.480/lib/python/snpe/converters/tensorflow/layers/ssd.py:282: RuntimeWarning: error_code=1000; error_message=Layer is not supported. Layer Postprocessor/BatchMultiClassNonMaxSuppression of type MultiClassNms not supported by GPU runtime; error_component=Model Validation; line_no=339; thread_id=139726119126848
  maxTotalDetections=classes_shape[-1])
 
  • 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.