Forums - Detector model quantized predicts correctly on CPU, but wrong on DSP

2 posts / 0 new
Last post
Detector model quantized predicts correctly on CPU, but wrong on DSP
octav.florescu
Join Date: 4 Jul 23
Posts: 3
Posted: Thu, 2023-09-21 06:53

I have quantized a detector model: Yolo X s of super-gradients repo using these commands:

snpe-dlc-quantize --input_dlc ../model640x480.dlc --output_dlc ../model640x480_quantized.dlc --input_list dataset/cropped640x480_snpe_raw/samples2.txt

Also, tried it via AIMET:

snpe-onnx-to-dlc --input_network ../aimet_model640x480.onnx --output_path ../aimet_model640x480.dlc --quantization_overrides aimet_model640x480.encodings


snpe-dlc-quantize --input_dlc ../aimet_model640x480.dlc --output_dlc ../aimet_model640x480_quant.dlc --input_list dataset/cropped640x480_snpe_raw/samples2.txt --override_params --enable_htp


snpe-dlc-graph-prepare --input_dlc ../aimet_model640x480_quant.dlc --output_dlc ../aimet_model640x480_quant_cache.dlc --htp_archs v68

The result in both ways of converting it, result in the same outcome:

- CPU predicts correctly

- DSP predicts all confidences randomly (e.g. objectness score is always ZERO)

Please consider that both CPU and DSP inferences use the same QUANTIZED DLC MODEL FILE.

Does DSP-infer read something else from the quantized-model-file than the CPU-infer ?

  • Up0
  • Down0
yunxqin
Join Date: 2 Mar 23
Posts: 44
Posted: Fri, 2023-09-22 02:21

Dear developer,

What's the version of snpe you used, and you can share you model with us through git.

BR.

Yunxiang

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