All Projects → Xilinx → Qnn Mo Pynq

Xilinx / Qnn Mo Pynq

Licence: bsd-3-clause

Projects that are alternatives of or similar to Qnn Mo Pynq

Personal data science projects
Stars: ✭ 173 (+0%)
Mutual labels:  jupyter-notebook
Iocaml
An OCaml kernel for the IPython notebook
Stars: ✭ 173 (+0%)
Mutual labels:  jupyter-notebook
Introduction To Time Series Forecasting Python
Introduction to time series preprocessing and forecasting in Python using AR, MA, ARMA, ARIMA, SARIMA and Prophet model with forecast evaluation.
Stars: ✭ 173 (+0%)
Mutual labels:  jupyter-notebook
Shared
Code and shared files
Stars: ✭ 171 (-1.16%)
Mutual labels:  jupyter-notebook
Ipynb
Package / Module importer for importing code from Jupyter Notebook files (.ipynb)
Stars: ✭ 174 (+0.58%)
Mutual labels:  jupyter-notebook
Captcha break
验证码识别
Stars: ✭ 2,268 (+1210.98%)
Mutual labels:  jupyter-notebook
Image generator
DCGAN image generator 🖼️.
Stars: ✭ 173 (+0%)
Mutual labels:  jupyter-notebook
Kdd18 Gluon
KDD18 Tutorial: Deep Learning and Natural Language Processing with Apache MXNet (Incubating) Gluon
Stars: ✭ 174 (+0.58%)
Mutual labels:  jupyter-notebook
Evolutionary Computation Course
Jupyter/IPython notebooks about evolutionary computation.
Stars: ✭ 173 (+0%)
Mutual labels:  jupyter-notebook
Pytorch sac
PyTorch implementation of Soft Actor-Critic (SAC)
Stars: ✭ 174 (+0.58%)
Mutual labels:  jupyter-notebook
Dfp
Reinforcement Learning with Goals
Stars: ✭ 173 (+0%)
Mutual labels:  jupyter-notebook
Deep Crowd Counting crowdnet
An independent implementation of "CrowdNet: A Deep Convolutional Network for Dense Crowd Counting"
Stars: ✭ 173 (+0%)
Mutual labels:  jupyter-notebook
Annotated Transformer
http://nlp.seas.harvard.edu/2018/04/03/attention.html
Stars: ✭ 2,403 (+1289.02%)
Mutual labels:  jupyter-notebook
Deep Math Machine Learning.ai
A blog which talks about machine learning, deep learning algorithms and the Math. and Machine learning algorithms written from scratch.
Stars: ✭ 173 (+0%)
Mutual labels:  jupyter-notebook
Time series prediction
This is the code for "Time Series Prediction" By Siraj Raval on Youtube
Stars: ✭ 174 (+0.58%)
Mutual labels:  jupyter-notebook
Stata kernel
A Jupyter kernel for Stata. Works with Windows, macOS, and Linux.
Stars: ✭ 172 (-0.58%)
Mutual labels:  jupyter-notebook
Provingground
Proving Ground: Tools for Automated Mathematics
Stars: ✭ 173 (+0%)
Mutual labels:  jupyter-notebook
Machine Learning And Reinforcement Learning In Finance
Machine Learning and Reinforcement Learning in Finance New York University Tandon School of Engineering
Stars: ✭ 173 (+0%)
Mutual labels:  jupyter-notebook
Nlp Exercises
Stars: ✭ 174 (+0.58%)
Mutual labels:  jupyter-notebook
Mpld3
mpld3 provides a custom stand-alone javascript library built on D3, which parses JSON representations of plots. The mpld3 python module provides a set of routines which parses matplotlib plots (using the mplexporter framework) and outputs the JSON description readable by mpld3.js.
Stars: ✭ 2,121 (+1126.01%)
Mutual labels:  jupyter-notebook

QNN-MO-PYNQ PIP INSTALL Package

This repo contains the pip install package for Quantized Neural Network (QNN) on PYNQ using a Multi-Layer Offload (MO) architecture. Two different overlays are here included, namely W1A2 (1 bit weights, 2 bit activations) and W1A3 (1 bit weights, 3 bit activations), executing in the Programmable Logic 1 Convolutional layer and 1 (optional) Max Pool layer.

Quick Start

In order to install it on your PYNQ board, connect to the board, open a terminal and type:

# (on PYNQ v2.3 and later versions, tested up to v2.5)
sudo pip3 install git+https://github.com/Xilinx/QNN-MO-PYNQ.git

NOTE: The board has to be connected to the internet.

The installation can take up to 10 minutes, since dependencies must be resolved and sources compiled.

This will install the QNN package to your board, and create a QNN directory in the Jupyter home area. You will find the Jupyter notebooks to test the QNN overlays in this directory.

In order to build the shared object during installation, the user should copy the include folder from VIVADO HLS on the PYNQ board (in windows in vivado-path/Vivado_HLS/201x.y/include, /vivado-path/Vidado_HLS/201x.y/include in unix) and set the environment variable VIVADOHLS_INCLUDE_PATH to the location in which the folder has been copied. If the env variable is not set, the precompiled version will be used instead.

Repo organization

The repo is organized as follows:

  • qnn: contains the qnn class description as well as the classes for the test networks
    • src: contains the sources of the 2 overlays and the libraries to rebuild them:
      • library: FINN library for HLS QNN-MO descriptions, host code, script to rebuilt and drivers for the PYNQ (please refer to README for more details)
      • network: overlay topologies (W1A2 and w1A3) HLS top functions, host code and make script for HW and SW built (please refer to README for more details)
    • bitstreams: with the bitstream for the 2 overlays
    • libraries: pre-compiled shared objects for low-level driver of the 2 overlays
    • params: set of trained parameters for the 2 overlays:
      • A pruned version of DoReFa-Net network, trained on the ImageNet dataset with 1 bit weights and 2 bit activations
      • A modified version of Tiny Yolo, namely Tinier-Yolo, trained on PASCAL VOC dataset with 1 bit weights and 3 bit activations
  • notebooks: lists a set of python notebooks examples, that during installation will be moved in /home/xilinx/jupyter_notebooks/qnn/ folder
  • tests: contains test scripts and test images

Hardware design rebuilt

In order to rebuild the hardware designs, the repo should be cloned in a machine with installation of the Vivado Design Suite (tested with 2017.4). Following the step-by-step instructions:

  1. Clone the repository on your linux machine: git clone https://github.com/Xilinx/QNN-MO-PYNQ.git;
  2. Move to clone_path/QNN-MO-PYNQ/qnn/src/network/
  3. Set the XILINX_QNN_ROOT environment variable to clone_path/QNN-MO-PYNQ/qnn/src/
  4. Launch the shell script make-hw.sh with parameters the target network, target platform and mode, with the command ./make-hw.sh {network} {platform} {mode} where:
    • network can be W1A2 or W1A3;
    • platform can be pynqz1-z2 or ultra96;
    • mode can be h to launch Vivado HLS synthesis, b to launch the Vivado project (needs HLS synthesis results), a to launch both.
  5. The results will be visible in clone_path/QNN-MO-PYNQ/qnn/src/network/output/ that is organized as follows:
    • bitstream: contains the generated bitstream(s);
    • hls-syn: contains the Vivado HLS generated RTL and IP (in the subfolder named as the target network);
    • report: contains the Vivado and Vivado HLS reports;
    • vivado: contains the Vivado project.
  6. Copy the generated bitstream and tcl script on the PYNQ board pip_installation_path/qnn/bitstreams/
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].