Comments (4)
frac_w, frac_input and frac_output depends on the distribution of your data.
If your weight is range from -32.0 to 32.0, like -19.83, 2.15, -5.14, 6.81, 21.02, 32.11.....
you should choose frac_w of 2 (1 signed bit, 5 integer bits, 2 fractional bit)
you have to use 5 integer bits to hold your range of weight. ( 2^5 = 32 )
every number larger than 32 will become 32. (you can see conv.cl code)
and if your weight is range only from -1 to 1, you don't need so many integer bits,
so you can increase your fractional bit to increase precision.
fran_input and frac_output done by the same way.
you have to try fractional bit with different layers, and see the accurate with your test data set.
the description of how to choose fractional bit is in the latest PipeCNN paper just in the document folder.
from pipecnn.
Okay, I find
rule #1, previous layer's output fraction number must equal to next layer's input fraction number.
rule #2, 1st layer's input fraction number is 0.
Anything else? Why in AlexNet the 1st layer's output fraction is (8, -4) but in VGG16 the output is (8, -2)? For the weight fraction, sometime it is (8,7), sometime it is (8,8) or (4,7) or other numbers such as (8,9) (8,10) (8,11), why?
Because I have trained my own model with different number of Convolution layers and FC layers but I don't how to set the weight fraction numbers to convert my own model.
Many thanks.
from pipecnn.
Dear Prof. Wang,
Could you please help me to briefly describe how to decide the frac_w, frac_input and frac_output numbers when you have spare time? I'm still waiting ... Thank you so much. 跪谢Orz
from pipecnn.
Hi, all, please refer to matlab's fixed-point number's defination in the Fixed-point Toolbox. We are using a very similar data format.
from pipecnn.
Related Issues (20)
- How can i run this project in ZCU102 with SD card? HOT 3
- data_test1.dat file
- In YOLO
- How to fix Wrong Results with Board De1Soc HOT 2
- Running PipeCNN on U200 HOT 7
- Need information about your project ! HOT 1
- How to caculate Coefficients lookup table for lrn computation
- make fpga error for xilinx HOT 14
- How to debug from the code. HOT 1
- Unable to download Data set HOT 2
- Integrate the similar module mult_add_fix8bx4 into the system. HOT 1
- Possibility of running on 3rd party board HOT 1
- Software emulation OpenCL runtime error, Xilinx/Vitis HOT 2
- Resnet Error on zcu102
- Software emulation OpenCL runtime error,can not return a result in executing Layer 1, Xilinx/Vitis
- Make host error, no opencl header files, ZCU102/Vitis/Xilinx HOT 5
- project_xilinx HardWare on U200 get a poor performance
- Unable to make file for project_xilinx
- ./run.exe conv.xclbin: terminate called recursively
- Error: incorrect setting of parameter VEC_SIZE !!!
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 pipecnn.