Forums - input data type for quantized model

4 posts / 0 new
Last post
input data type for quantized model
gal.safra
Join Date: 6 May 21
Posts: 3
Posted: Wed, 2021-12-29 01:05

Hi All,

when quantizing a model, i get the min,max and delta encoding.

allthough input data type is float, it is actualy act as char. beacuse (abs(min) + abs (max)) / delta = 255.

Are the calculations inside the quantized model use the floats values or does it use them with the delta?

and if it convert them to char internaly, is there a way to pass the input as char in the first place? and to aviod the convertion to float in my pre-process?

 

 

 

  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Thu, 2021-12-30 17:40

Dear customer,

The SNPE will take the float input as the quantization and then feeds to engine for next step. SNPE will use the encoding values from tb if fakequant nodes has provided in quantization flow.

BR.

Wei

  • Up0
  • Down0
gal.safra
Join Date: 6 May 21
Posts: 3
Posted: Tue, 2022-01-11 05:21

Thank you for your answer.

just so i fully understand - is it possible to give the quantized .dlc input that is not float? uint8 for example? 

  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Sun, 2022-01-16 17:58

Dear customer,

If you run on float dlc, the SNPE will execute with online compilier type as the performance is not good.

We're reommending to take the quantize dlc to implement on the final device as run with offline compiler. This way will speed up the model performance.

SNPE engin will convert data to quanzation bitwidth no matter you input with float or fixed points data.

BR.

Wei

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