To generate the quantized inference model and reference result, follow these steps:
- Generate the quantized inference model by running the following
command to quantize the
model.
python resnet18_quant.py --quant_mode calib --subset_len 200
- Set deploy_check to True in export_xmodel
API.
quantizer.export_xmodel(deploy_check=True)
- Generate the reference result by running the following command to
generate reference
data.
python resnet18_quant.py --quant_mode test
- Generate the DPU xmodel by running the following command to generate
DPU xmodel
file.
vai_c_xir -x /PATH/TO/quantized.xmodel -a /PATH/TO/ arch.json -o /OUTPUTPATH -n netname}
- Generate the DPU inference result.
This step is same as the step in TensorFlow workflow.
- Crosscheck the reference result and the DPU inference result.
This step is same as the step in TensorFlow workflow.