Question
stm32ai INTERNAL ERROR: list index out of range
- February 11, 2024
- 2 replies
- 2206 views
I have a DB (Differentiable Binarization) model exported to ONNX, and I quantized it with onnxruntime using the code below:
```
dr = DetDataReader(
calibration_dataset_path, input_model_path
) # Fake images as I'm just attempting to measure the memory usage.
conf = StaticQuantConfig(
calibration_data_reader=dr,
quant_format=QuantFormat.QDQ,
calibrate_method=CalibrationMethod.MinMax,
# optimize_model=True,
activation_type=QuantType.QInt8,
weight_type=QuantType.QInt8,
# nodes_to_exclude=['resnetv17_dense0_fwd', ..],
# nodes_to_quantize=['resnetv17_dense0_fwd', ..],
per_channel=False) # I tried True as well.
quantize(input_model_path, output_model_path, conf)
```
Then I tried to analyze it with the stm32ai tool, but I got the following error
$ stm32ai \
analyze --model model-quant.onnx \
--type onnx \
--name det \
--compression high \
--no-onnx-optimizer \
--output output \
--allocate-inputs --allocate-outputs \
--with-report \
--series stm32f4 --target stm32f4 --workspace workspace
analyze --model model-quant.onnx \
--type onnx \
--name det \
--compression high \
--no-onnx-optimizer \
--output output \
--allocate-inputs --allocate-outputs \
--with-report \
--series stm32f4 --target stm32f4 --workspace workspace
Neural Network Tools for STM32 family v1.7.0 (stm.ai v8.1.0-19520)
INTERNAL ERROR: list index out of range
I attach my model below (Archive.rar) in case someone can help me. Thanks in advance. Regards!
