- Docker イメージを起動します。
[Host]$ cd Vitis-AI [Host]$ ./docker_run.sh xilinx/vitis-ai-cpu:latest
- モデルのソース コード パッケージ 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
- 量子化を実行します。
[Docker]$ conda activate vitis-ai-tensorflow2 [Docker]$ bash 1_run_train.sh [Docker]$ bash 3_run_quantize.sh
量子化が完了すると、quantized.h5 という名前の量子化済みモデルが ./quantized/ ディレクトリに生成されます。