Skip to content

Commit 99bf0ad

Browse files
authored
Merge pull request #5 from fastmachinelearning/feature/gtsrb_cnv
Add Brevitas binarized CNV topology trained on GTSRB
2 parents 8d14c4a + d0ddd79 commit 99bf0ad

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Copyright (c) 2023- Advanced Micro Devices, Inc (Nicholas Fraser)
2+
Copyright (c) 2018- Xilinx, Inc (Alessandro Pappalardo)
3+
Copyright (c) 2016- Facebook, Inc (Adam Paszke)
4+
Copyright (c) 2014- Facebook, Inc (Soumith Chintala)
5+
Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
6+
Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
7+
Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
8+
Copyright (c) 2011-2013 NYU (Clement Farabet)
9+
Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston)
10+
Copyright (c) 2006 Idiap Research Institute (Samy Bengio)
11+
Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz)
12+
13+
All rights reserved.
14+
15+
Redistribution and use in source and binary forms, with or without
16+
modification, are permitted provided that the following conditions are met:
17+
18+
1. Redistributions of source code must retain the above copyright
19+
notice, this list of conditions and the following disclaimer.
20+
21+
2. Redistributions in binary form must reproduce the above copyright
22+
notice, this list of conditions and the following disclaimer in the
23+
documentation and/or other materials provided with the distribution.
24+
25+
3. Neither the names of Xilinx, Facebook, Deepmind Technologies, NYU,
26+
NEC Laboratories America and IDIAP Research Institute nor the names
27+
of its contributors may be used to endorse or promote products derived
28+
from this software without specific prior written permission.
29+
30+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
31+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
34+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
35+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
37+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
38+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40+
POSSIBILITY OF SUCH DAMAGE.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Brevitas GTSRB example
2+
3+
This is the binarized CNV topology from the paper [FINN: A Framework for Fast, Scalable Binarized Neural Network Inference](https://arxiv.org/abs/1612.07119) which is trained
4+
on the [German Traffic Sign Recognition Benchmark (GTSRB)](https://benchmark.ini.rub.de/gtsrb_news.html) dataset and exported in QONNX format.
5+
6+
## Models
7+
8+
NOTE: Accuracy numbers listed here are provided by the trainer, and are not verified running through QONNX at this time.
9+
10+
| Name | Input quantization | Weight quantization | Activation quantization | Dataset | Top1 accuracy |
11+
|----------|------------------------------|---------------------|-------------------------|---------------|---------------|
12+
| CNV_1W1A | 8 bit | 1 bit | 1 bit | GTSRB | 96.93% |
13+
14+
15+
## Train
16+
17+
The training scripts for the CNV topology are located in [Brevitas Repo](https://github.com/Xilinx/brevitas/tree/master/src/brevitas_examples/bnn_pynq).
18+
The original setup uses the CIFAR-10 dataset, which was subsequently modified by [Nicholas Fraser](https://github.com/nickfraser) for GTSRB for this example.
19+
20+
## License
21+
22+
Models are licensed under LICENSE.txt within this directory.
Binary file not shown.

0 commit comments

Comments
 (0)