Forums - Convert tinyyolo error

10 posts / 0 new
Last post
Convert tinyyolo error
yaochuanqi888
Join Date: 26 Jul 17
Posts: 4
Posted: Fri, 2017-08-18 02:17
Some error occurs when convert tinyyolo( converted to tensorflow pb file by darkflow):
2017-08-18 16:42:40,329 - 388 - WARNING - WARNING_TF_SCOPE_OP_NOT_CONSUMED: Scope (Pad) operation(s) not consumed by converter: [u'Pad'].
2017-08-18 16:42:40,329 - 122 - ERROR - Conversion failed: Some nodes in the Tensorflow graph were not resolved to a layer!
 
  • Up0
  • Down0
sivagnanammurthy
Join Date: 17 Oct 17
Posts: 9
Posted: Thu, 2017-11-16 23:45

Any progress on this? Were you able to get Tiny YOLO working with SNPE?

  • Up0
  • Down0
zf.africa
Join Date: 15 Jun 17
Posts: 51
Posted: Sun, 2017-11-19 22:47

Hi yaochuanqi,

Did you meet the unconsumed operations about elementwise ops, such as mul/add/max?

What about the solution to it?

I wrote a simple linear regression demo, when convert pb file to dlc, it would report unconsumed ops: add/mul.

Thank you! Hope to get response as soon as possible!

  • Up0
  • Down0
dmarques
Join Date: 15 Sep 17
Posts: 27
Posted: Mon, 2017-11-20 07:27

Element-wise operations require two input layers (when converted to DLC) so the inputs can not be const operations but other operation types which are converted to a SNPE layer.

With respect to pad operations, it is not currently supported.

  • Up0
  • Down0
zf.africa
Join Date: 15 Jun 17
Posts: 51
Posted: Tue, 2017-11-21 00:52

Hi dmarques,

Thanks for replying!

Do you mean that, element-wise operations accept layers as inputs, but it is currently not supported, because of pad operations?

So element-wise operations are currently not supported by convert tool?

  • Up0
  • Down0
dmarques
Join Date: 15 Sep 17
Posts: 27
Posted: Tue, 2017-11-21 06:17

In the tensorflow graph the 2 inputs of the element wise operation must be nodes which correspond to a layer. For example if you have the following:

Conv2D (A) \ 

                > EltWiseSum

Conv2D (B) /

It will convert to the following layers:

Conv2D (A)

Conv2D (B)

EltWiseSum

However if you have for example:

Conv2D (A) \ 

                > EltWiseSum

Const /

This won't work as the Const node is not a layer. The same will happen if the input Operation to an EltWise is not a supported operation by SNPE.

Please review the "Tensorflow Graph Compatibility" section of the docs for more details on supported operations.

  • Up0
  • Down0
zf.africa
Join Date: 15 Jun 17
Posts: 51
Posted: Tue, 2017-11-21 19:41

Hi dmarques,

Thank you, and I will try the way you provided.

And here is another question: I'm not sure about parameter "--allow_unconsumed_nodes", when I convert slim.separable_convolution2d, snpe-tensorflow-to-dlc would report:

2017-11-22 10:42:49,070 - 308 - WARNING - WARNING_TF_SCOPE_OP_NOT_CONSUMED: Operation (MobileNet/conv_ds_2/depthwise_conv/BiasAdd) not consumed by converter: BiasAdd.
2017-11-22 10:42:49,071 - 123 - ERROR - Conversion failed: ERROR_TF_OPERATION_NOT_MAPPED_TO_LAYER: Some operations in the Tensorflow graph were not resolved to a layer. You can use --allow_unconsumed_nodes for partial graph resolution!
 

I've checked the BiasAdd API, it is actually nn.bias_add. If I use --allow_unconsumed_nodes parameter, it would output a converted dlc file, but still got the warning log:

2017-11-22 11:31:07,168 - 308 - WARNING - WARNING_TF_SCOPE_OP_NOT_CONSUMED: Operation (MobileNet/conv_ds_2/depthwise_conv/BiasAdd) not consumed by converter: BiasAdd.

The question is what does snpe-tensorflow-to-dlc do with BiasAdd operation? Does it just simply ignore BiasAdd operation, and  there are no BiasAdd operations in the output dlc file? If does, the dlc file would not give correct computation result.

  • Up0
  • Down0
zl1994
Join Date: 12 Aug 17
Posts: 8
Posted: Tue, 2017-11-21 22:03

yes,I have tested, it just simply ignore the unconsumed operation(here is the BiasAdd operation).

  • Up0
  • Down0
dmarques
Join Date: 15 Sep 17
Posts: 27
Posted: Wed, 2017-11-22 05:12

Are you able to create a minimal frozen graph which reproduces the issue you are seeing? The BiasAdd operation should be converted properly given it follows a Conv2D operation and is in the same tensorflow named scope.

  • Up0
  • Down0
f10.liu
Join Date: 22 Mar 18
Posts: 10
Posted: Thu, 2018-03-22 23:12

Hi, dmarques

Do you know when SNPE will support the pad operation?

 

Thank you very much.

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