PyTorch Workflow - 1.4.1 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2021-12-13
Version
1.4.1 English

To generate the quantized inference model and reference result, follow these steps:

  1. Generate the quantized inference model by running the following command to quantize the model.
    python resnet18_quant.py --quant_mode calib --subset_len 200
  2. Generate the reference result by running the following command to generate reference data.
    python resnet18_quant.py --quant_mode test
  3. 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}
  4. Generate the DPU inference result.

    This step is same as the step in TensorFlow workflow.

  5. Crosscheck the reference result and the DPU inference result.

    This step is same as the step in TensorFlow workflow.