This repo contains the pip install package for Quantized Neural Network (QNN) on PYNQ. Two different network topologies are here included, namely CNV and LFC as described in the FINN Paper . Now, there are multiple implementations available supporting different precision for weights and activation:
We support 3 boards for hardware acceleration which are Pynq-Z1, Pynq-Z2 and Ultra96 (with PYNQ image).
Note, this repository has now been archived and is no longer being actively maintained. If you are relying on this repository, we strongly recommend you switch to the FINN compiler.
If you find BNN-PYNQ useful, please cite the FINN paper:
@inproceedings{finn,
author = {Umuroglu, Yaman and Fraser, Nicholas J. and Gambardella, Giulio and Blott, Michaela and Leong, Philip and Jahre, Magnus and Vissers, Kees},
title = {FINN: A Framework for Fast, Scalable Binarized Neural Network Inference},
booktitle = {Proceedings of the 2017 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays},
series = {FPGA '17},
year = {2017},
pages = {65--74},
publisher = {ACM}
}
Please refer to PYNQ Getting Started guide to set-up your PYNQ Board.
In order to install it to your PYNQ, connect to the board, open a terminal and type:
sudo pip3 install git+https://github.com/Xilinx/BNN-PYNQ.git (on PYNQ v2.3 and later versions, tested up to v2.5)
sudo pip3.6 install git+https://github.com/Xilinx/BNN-PYNQ.git (on PYNQ v2.2 and earlier)
This will install the BNN package to your board, and create a bnn directory in the Jupyter home area. You will find the Jupyter notebooks to test the networks in this directory.
The repo is organized as follows:
/home/xilinx/jupyter_notebooks/bnn/
folderIn order to rebuild the hardware designs, the repo should be cloned in a machine with installation of the Vivado Design Suite (tested with 2018.2). Following the step-by-step instructions:
git clone https://github.com/Xilinx/BNN-PYNQ.git --recursive
;<clone_path>/BNN_PYNQ/bnn/src/network/
<clone_path>/BNN_PYNQ/bnn/src/
./make-hw.sh {network} {platform} {mode}
where:
h
to launch Vivado HLS synthesis, b
to launch the Vivado project (needs HLS synthesis results), a
to launch both;clone_path/BNN_PYNQ/bnn/src/network/output/
that is organized as follows:
pip_installation_path/bnn/bitstreams/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。