Quantizing - 2.5 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2022-06-15
Version
2.5 English
  1. Launch the docker image
    
    [Host]$ cd Vitis-AI
    [Host]$ ./docker_run.sh xilinx/vitis-ai-cpu:latest
  2. Download the model source code package tf2_custom_op_demo.tar.gz
    
    [Docker]$ wget https://www.xilinx.com/bin/public/openDownload?filename=tf2_custom_op_demo.tar.gz -O tf2_custom_op_demo.tar.gz
    [Docker]$ tar -xzvf tf2_custom_op_demo.tar.gz
    [Docker]$ cd tf2_custom_op_demo
  3. Quantize
    
    [Docker]$ conda activate vitis-ai-tensorflow2
    [Docker]$ bash 1_run_train.sh
    [Docker]$ bash 3_run_quantize.sh

After quantizing, the quantized model named quantized.h5 will be generated in the ./quantized/ directory.