Quantizing the model - 2.5 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2022-06-15
Version
2.5 English
  • Prepare dataset. For tf_resnet50 model, download the calibration images from Imagenet_calib.tar.gz, and copy into Vitis-AI folder (Full dataset is from ImageNet).
  • Launch the docker image
    [Host]$ ./docker_run.sh xilinx/vitis-ai-cpu:latest
  • Quantize the model
    Set CALIB_BATCH_SIZE in the tf_resnetv1_50_imagenet_224_224_6.97G_2.5/code/quantize/config.ini to 5. Then run
    
    [Docker]$ conda activate vitis-ai-tensorflow
    [Docker]$ tar -xzvf Imagenet_calib.tar.gz -C tf_resnetv1_50_imagenet_224_224_6.97G_2.5/data
    [Docker]$ cd tf_resnetv1_50_imagenet_224_224_6.97G_2.5/code/quantize
    [Docker]$ bash quantize.sh

After running quantize.sh, the quantized model are available in tf_resnetv1_50_imagenet_224_224_6.97G_2.5/quantized