Xilinx / Vitis-AI

Vitis AI is Xilinx’s development stack for AI inference on Xilinx hardware platforms, including both edge devices and Alveo cards.
https://www.xilinx.com/ai
Apache License 2.0
1.49k stars 629 forks source link

Vitis AI Compiler XNNC v1.3.1 error #2 #362

Closed JerrySciangula closed 2 years ago

JerrySciangula commented 3 years ago

Hi everyone, I'm a master graduating student at Scuola Superiore Sant'Anna in Pisa. For my thesis, I'm trying to accelerate a custom network model on a ZCU102 ultrascale+ using the latest version of Vitis-AI tools v1.3.1.

The model has been successfully quantized with the following command:

_vai_qcaffe quantize -model deploy.prototxt -weights deploy.caffemodel -output_dir ./q_lane_detector -keep_fixed_neuron.

When I compile the model through the command:

_vai_ccaffe --prototxt q_lane_detector/deploy.prototxt --caffemodel q_lane_detector/deploy.caffemodel --arch /opt/vitis_ai/compiler/arch/DPUCZDX8G/ZCU102/arch.json --output_dir ./compilation --net_name lane_detector

the _[UNILOG][FATAL][XCOM_DATAOUTRANGE][Data value is out of range!] error is reported: Schermata da 2021-04-01 17-07-47

Can anyone hepl me to understand the error?

Thanks in advance

qianglin-xlnx commented 3 years ago

Hi @JerrySciangula Thank you for your feedback. The error shows that some model parameters are out of DPU limits. Could you please share the quantized model so that we can further analyze the problem.

JerrySciangula commented 3 years ago

Hi @qianglin-xlnx, the quantized deploy.prototxt and deploy.caffemodel files are attached here in the zip file: quantized_files.zip

Please, let me know if you need some other files.

qianglin-xlnx commented 3 years ago

Hi @JerrySciangula Could you please tell me which version of quantizer do you use to quanzite the model? VAI1.2 or VAI1.3 or VAI1.3.1? Thank you.

JerrySciangula commented 3 years ago

Hi @qianglin-xlnx,

I'm using the CPU Docker Image Version: 1.3.598, with Build Date: 2021-02-18.

I tried the command vai_q_caffe -version and it gave me: vai_q_caffe version 1.2.5 Build Label Feb 1 2021 05:05:25

qianglin-xlnx commented 3 years ago

HI @JerrySciangula Could you share the float model and few calibration data? We need them to further analyze the problem. Thank you very much.

JerrySciangula commented 3 years ago

Hi @qianglin-xlnx, thanks a lot for the patience.

The float model is too big to load it here directly on github. Therefore, I arranged a Wetransfer link with all the information you asked me. The link enables you to download a wetransfer zip file with a directory and inside the directory you can find two zip files: one for the float model and one for the calibration images.

Link: https://we.tl/t-M0W6EWdRkB