Skip to content
forked from Xilinx/finn

A Framework for Fast, Scalable Binarized Neural Network Inference

License

Notifications You must be signed in to change notification settings

tallurips91/FINN

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FINN

FINN is an end to end framework for generating high performance FPGA hardware implementations of neural networks.

Installation

FINN can be used within a Docker container (recommended flow) or locally.

Docker Install flow

git clone <repo> cd FINN docker build . --tag=finn docker run -it finn

Local Install flow

Prerequisites

git clone <repo>

Quick Start

cd FINN source env.sh git lfs pull

Estimate performance of LFC MLP network

python FINN/bin/finn --device=pynqz1 --prototxt=FINN/inputs/lfc-w1a1.prototxt --mode=estimate

Estimate performance and synthesize CNV network

python FINN/bin/finn --device=pynqz1 --prototxt=FINN/inputs/cnv-w1a1.prototxt --caffemodel=FINN/inputs/cnv-w1a1.caffemodel --mode=synth

User guide

FINN can be called in two modes, estimate and synth. "Estimate" mode reads in the prototxt of the network, constructs a hardware model of the network and scales up the hardware to optimally utilize the chosen device. This process produces a report of estimated performance and hardware utilisation. "Synth" mode performs the same actions as estimate, but additionally calls Xilinx Vivado tools to synthesize the design for the target device.

Reference Designs

Two reference designs are included. Both have binarized weights and activations.

MLP

A multilayer perceptron, trained for MNIST digit recognition.

  • prototxt = FINN/inputs/lfc-w1a1.prototxt
  • caffemodel = FINN/inputs/lfc-w1a1.caffemodel

CNV

A convolutional neural network, trained for CIFAR10 image classification.

  • prototxt = FINN/inputs/cnv-w1a1.prototxt
  • caffemodel = FINN/inputs/cnv-w1a1.caffemodel

Citation

If you find FINN 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}
}

About

A Framework for Fast, Scalable Binarized Neural Network Inference

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 48.1%
  • C++ 35.4%
  • Tcl 8.4%
  • C 5.0%
  • Shell 1.9%
  • Makefile 1.1%
  • Dockerfile 0.1%