git clone --recurse-submodules https://github.com/Xilinx/Vitis-AI
cd Vitis-AI
2.2 从 docker上拉取预编译好的vitis ai 的安装环境,(若在本地安装请准备好32G 以上的内存用于安装时的编译)。
启动docker 环境中的vitis ai :
./docker_run.sh xilinx/vitis-ai-cpu:latest
注意到默认启动最新版本的vitis ai, 如需启动对应的版本,在后面指定对应的序列。
Vitis AI v1.4 ./docker_run.sh xilinx/vitis-ai-cpu:1.4.916
Vitis AI v1.3 ./docker_run.sh xilinx/vitis-ai-cpu:1.3.411
Vitis AI v1.3.1
Vitis AI v1.3.2
Vitis AI v1.2 ./docker_run.sh xilinx/vitis-ai-cpu:1.2.82
2.3 在启动vitis ai后, 可以看到vitis ai 当前支持的深度学习框架有Pytorch、Tensorflow、Tensorflow 2 和 Caffe.
Part5: Evaluate test-dev2017 about 21k images on the Ultra_96_v2 .
5.1 We may use about 2.5 days( = 223978 s /60s / 60 min / 24 Hour ) to get the following information:
top - 10:47:35 up 3 days,
process batch: 286
process batch: 287
save current epoch result, and this is the epoch : 51
The whole number of images: 20288
Total time: 223978.88142991066 seconds
Total energy: 867699.8735406108 J
root@pynq:/home/xilinx/jupyter_notebooks/lpcv_2021#
Every epoch inculde 400 images, so 50 * 400 + 288 = 20288 is correct.
5.2 The reason we divide the 20288 images into 51 epochs to test is that the ultra96_v2 board's memory is 2 G.
It is often occurs running out of memory and cause the connection refused.
Here is the solution we use, extanding the swap space temporary.
check all process "top"
Check the current usage "free -h " and show the usage of the swap "swapon --show".
sudo su to get the super privillage.
-make a folder to storage the swapfile.
mkdir "root/swap/swapfile" cd to this path, if don't have this path make it.
"sudo dd if=/dev/zero of=swap2G bs=1G count=2 " ; make a swap file
"mkswap swap2G"; Turn the swap file into a swap space .
"swapon swap2G "; Activate this swap space.
5.3 We make it swap space as temporary, because we know , the swap space use regard as a "fake memory of the RAM", when use this hardware space with a high process speed, it may reduce the hardware's life.
If you want make this swap space as a permanent,
sudo vim /etc/fstab; add "root/swap/swapfile/swap2G swap swap defaults 0 0 " to this file.