Step 1 Prepare a computer with the 64-bit Ubuntu 16.04 system.
Step 2 Run the following command to install python3 and pip:
sudo apt-get install python3 python3-pip python3-virtualenv
Step 3 Do as follows to install the related dependencies:
Obtain the acuity-toolkit-binar toolkit and go to the root directory.
Execute: for req in $(cat requirements.txt); do pip3 install $req; done
Step 4 Check the environment
Execute: python3 bin/checkenv.py
Note: if check success, will have Env Pass: Env check SUCCESS!!! print .
量化:量化是将以往用 32bit 或者 64bit 表达的浮点数用 16bit、8bit 或者更低的2bit 方式进行存储。
模型转换过程是先将模型量化成 int8、int16 或者 uint8 数据格式,再转成基于khadas平台运行的 nbg 格式文件,并导出运行的 case 代码。
量化配置脚本如下:
1.通常情况下,选择u8/int8的方式均可。u8是google推荐量化方式。
2.一般建议不选取int16,相较8bit量化,模型大一倍,并在精度上没有明显的优势。
3.参考模型前处理后的取值范围选取量化方式。比如,如果模型前处理后的取值范围为(0~255),此时建议直接选取 u8 的量化方式。
4.