Comments (1)
Hi @TATynise,
Thanks for your question!
Residual networks are indeed a bit tricky since it requires a streamlining process that's relatively more involved compared to linear networks. It looks like the streamlining process didn't 'fully streamline' the graph -- meaning you have a few floating point operators left in your network. In the final image you showed, you can see that the Mul
and Add
nodes (which are regular ONNX node) are mixed with the so-called fpgadataflow
nodes (FMPadding_Batch
, ConvolutionInputGenerator
). The CreateDataflowPartition
transform will partition your model in smaller sub-models, where each sub-model will consists of (exclusively) nodes that are either standard ONNX nodes or fpgadataflow
-type nodes (i.e. nodes that will in the end run on the FPGA). Since your network is residual and contains many of these regular ONNX node mixed with fpgadataflow
-type nodes, the partitioning becomes more complicated and breaks along the way somewhere.
To resolve this, I would first suggest to revisit the streamlining of your network, since I presume your target is to run the full network on the FPGA rather than partly. One trick to make this easier, is to add uniform quantizers at the end of both residual lanes in your custom network (before exporting it with Brevitas). In the third image you showed, this would result in having a MultiThreshold
node at the end of both lanes. These MultiThreshold
nodes are essentially what allows us to streamline away floating point operators by moving them around and absorbing them in those MultiThreshold
thresholds. By then calling transforms such as AbsorbAddIntoMultiThreshold and AbsorbMulIntoMultiThreshold, those floating point operators will be absorbed in the thresholds of the subsequent MultiThreshold
node.
This would remove the floating point operators you showed in the screenshots and bring you one step closer to full FPGA execution. Hope this helps you further and please let us know if you run into further issues!
from finn-examples.
Related Issues (20)
- finn build problem : Running step: step_synthesize_bitfile HOT 8
- 2_imagenet_with_cnns.ipynb stuck HOT 2
- Issues rebuilding bnn-pynq HOT 2
- ResNet-50 model and notebook release HOT 1
- Working configuration for custom building with Vivado/Vitis 2022.1
- Installing finn-examples fails on Pynq Z2 (version 2.7) HOT 8
- How to use bincop-cnv (mask detection) on Pynq-Z2 (version 2.7)? HOT 1
- Error building Mobilenet-v1 HOT 16
- Update FINN version in `get_finn.sh` HOT 1
- ResNet-50 Python Brevitas Model HOT 4
- Installation under PYNQ v3.0.1 for ZCU104 is broken HOT 4
- build-all.sh fails with AttributeError: module 'attr' has no attribute 'define' HOT 1
- How to target a different board/FPGA than the examples? HOT 2
- Vivado project files for examples HOT 1
- Working with Custom model HOT 1
- Infer Brevitas CNV model on Non-PYNQ board
- Problem with installing finn-examples
- MobileNet Example(Maxpool Version) doesn't work HOT 5
- Problem running FINN examples
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from finn-examples.