leo9344 / Comprehensive-practice-of-intelligent-chip-system-design

COPY: Comprehensive practice Of intelligent chiP sYstem design

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comprehensive-practice-of-intelligent-chip-system-design

COPY: Comprehensive practice Of intelligent chiP sYstem design

Caution: The project still needs maintenance and some

Overview

We trained, implemented and deployed an FPGA-based Convolutional Neural Network (CNN) in Verilog and Python.

Model

fig_cnn

Training

python model.py

Get information (FLOPs, Params, Mem Size) of our model

Thanks to torchsummary and thop, we can easily get model information by a few lines of code.

Uncomment the code on line 129-133 in model.py then run it.

Quantization

Use utils.py to get Q8.8 result of our model

python utils.py --model /path/to/your/model --ori_path /path/to/save/original/results --q_path /path/to/quantized/results

Ex:

python utils.py --model FP16+Aug_Acc0.995_Epoch18.pth --ori_path ./layers/original/ --q_path ./layers/quantized/

Notice

Original model will be saved in --ori_path while quantized model will be saved in --q_path

After you get the result of quantization, copy them to corresponding path of FPGA-proj-master

Visualization

You can use visualizer.py to make comparisons between your models.

RTL Design

Simulation

IP Package

Field Test

About

COPY: Comprehensive practice Of intelligent chiP sYstem design

License:MIT License


Languages

Language:VHDL 96.1%Language:Verilog 2.2%Language:V 1.0%Language:Shell 0.3%Language:Tcl 0.2%Language:SystemVerilog 0.1%Language:JavaScript 0.1%Language:Stata 0.0%Language:Python 0.0%Language:Forth 0.0%Language:Batchfile 0.0%Language:Pascal 0.0%Language:PureBasic 0.0%