Forums - Mobilenet_v2 onnx to dlc

2 posts / 0 new
Last post
Mobilenet_v2 onnx to dlc
bychen
Join Date: 30 Jun 20
Posts: 1
Posted: Fri, 2020-07-10 00:21

Hi,

Here is my environment setting : ubuntu 16.04, SNPE 1.39, onnx 1.7.0.

I tried to convert mobilenet_v2 onnx model to .dlc file and get the following warning:

WARNING_OP_NOT_SUPPORTED_BY_ONNX: Unable to register converter supported Operation [ScaledTanh:Version 1] with your Onnx installation. Got: No schema registered for 'ScaledTanh'!. Converter will bail if Model contains this Op.
WARNING_OP_NOT_SUPPORTED_BY_ONNX: Unable to register converter supported Operation [ScaledTanh:Version 6] with your Onnx installation. Got: No schema registered for 'ScaledTanh'!. Converter will bail if Model contains this Op.
2020-07-10 15:01:00,210 - 171 - INFO - INFO_DLC_SAVE_LOCATION: Saving model at dlc/mobilenet_v2.dlc
2020-07-10 15:01:00,439 - 171 - INFO - INFO_CONVERSION_SUCCESS: Conversion completed successfully
 
I ignored the warnings and then  I prepared 4 Imagenet  samples and converted them to .raw by the sample code(create_alexnet_raw.py).  
Execute snpe-net-run with input_network(mobilenetv2.dlc) and the 4 samples.
However, I got the following results:
 
Classification results
cropped/ipod.raw     194.806503 470 candle, taper, wax light
cropped/banaba.raw   194.354355 470 candle, taper, wax light
cropped/monitor.raw  188.973740 470 candle, taper, wax light
cropped/aircraft.raw 183.850708 470 candle, taper, wax light
 
All samples are calssified as the same category.
Is warning of 'ScaledTanh' during conversion the main cause of the problem?
How can I solve this??
 (The model output is not Softmax, thus it's not probaility between)
 
Thanks in advance!!!
 
 
 
  • Up0
  • Down0
gesqdn-forum
Join Date: 4 Nov 18
Posts: 184
Posted: Tue, 2020-07-14 03:04

Hi Bychen,

It is seen that support for ScaledTanhis not available with the 1.4 release of onnx. Find the same from the below link,
https://github.com/onnx/onnx/pull/1866

But, the official documentation from NPE says that ScaledTanh is tested on SNPE with onnx version 1.3
Please refer below link for details on supported ONNX operations:
https://developer.qualcomm.com/docs/snpe/supported_onnx_ops.html#onnx_operator_support

We suggest you downgrade your onnx version and try to convert and execute the model again.

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