This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: There is a coefficient difference between the quantization model inference result and the onnx inference result

Part Number: TDA4VM

Hi team,

Using sdk 0701.

Does the quantization process occur during the conversion of the model by the tidlModelImport tool? The customer calls the PC_dsp_test_dl_algo.out tool on the converted int8 model to inference the picture, and then finds a coefficient difference between the parsed inference result and the inference result of onnx.

The quantization script is as follows:

modelType          = 2
numParamBits = 8
numFeatureBits = 8
inputNetFile = "../../test/testvecs/collate/fs_noCoord/models/fs_noCoord.onnx"
outputNetFile = "../../test/testvecs/collate/fs_noCoord/infer/8/tidl_net_fs_noCoord.bin"
outputParamsFile = "../../test/testvecs/collate/fs_noCoord/infer/8/tidl_io_fs_noCoord_"
inDataNorm = 1
inMean = 123.675 116.28 103.53
inScale = 0.017125 0.017507 0.017429
resizeWidth = 480
resizeHeight = 480
inWidth = 480
inHeight = 480
inNumChannels = 3
inData = ../../test/testvecs/collate/fs_noCoord/calib_list.txt
postProcType = 0


The inference results for the int8 model are as follows:
-33.00000000
-41.00000000
-42.00000000
-40.00000000
-41.00000000
-32.00000000
-27.00000000
-22.00000000
-25.00000000
-37.00000000
...



The inference for onnx is as follows:
-14.12847805
-17.56087685
-18.81339073
-17.77967834
-18.89683342
-14.82417774
-13.74363136
-11.10289955
-12.24503803
-17.49886703
....

The customer would like to know how to get the desired coefficients for the final model output to be converted to the output of the float model. Thanks!
Best Regards,
Cherry