Forums - Update Already quantized model

4 posts / 0 new
Last post
Update Already quantized model
danweil24
Join Date: 17 Nov 21
Posts: 12
Posted: Tue, 2022-06-21 01:40

Hello, I have a model that I  already quantized in snpe 1.5.2. Unfortunately, I don't have the raw images. 

When switching to snpe 1.6.3 ,Its takes more time to load the network (using the htp) I thought that maybe re-quantized the model in the newer version will help. Can I re-quantize the already quantized model without images? 

Tnks ,Dan 

  • Up0
  • Down0
hazelmaris.sa1
Join Date: 23 Jun 22
Posts: 1
Posted: Thu, 2022-06-23 00:23
I have a TensorFlow v1.6 model, that I am able to successfully convert to a DLC model (although some layers do not have GPU support). Conversion of this DLC model to a quantized model seems to work just fine. But, when I push the quantized model to the Snapdragon, the device goes offline. This happens each time I've tried pushing this model (I've tried pushing to multiple file locations). I've successfully pushed other quantized models to my Snapdragon that are similar in size, so it appears to be a problem with this specific model. Any idea what might be going on? I'm able to run the non-quantized DLC model on the DSP using run-time quantization.
 
 

 

  • Up0
  • Down0
ruzhongl
Join Date: 7 Jun 21
Posts: 42
Posted: Thu, 2022-06-23 07:19

HTP use a new arch, if you use quantized DLC, it will do graph optimizaiton in init stage, this is why you observe the long time when loading the network.

1 with float model, you can use snpe-dlc-quantize xxx --enable-htp

2 with quant model, you can use a another tool called snpe-dlc-graph-prepare. This tool will help you generate a optimization graph with quantized dlc. 

 

Note: for some reasons,  optimization graph  is not compatible b/w snpe version. If you use SNPE 1.6.x in future, you need to call snpe-dlc-graph-prepare to generate optimization graph again.

  • Up0
  • Down0
ruzhongl
Join Date: 7 Jun 21
Posts: 42
Posted: Thu, 2022-06-23 07:23

@hazelmaris.sa1

For your issue, it is tricky, I do not meet similar issue before. Not sure whether you can push float model to device. 

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