Giter Site home page Giter Site logo

Fixed-point model numbers about pipecnn HOT 4 CLOSED

doonny avatar doonny commented on July 21, 2024
Fixed-point model numbers

from pipecnn.

Comments (4)

aazz44ss avatar aazz44ss commented on July 21, 2024 1

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.

laski007 avatar laski007 commented on July 21, 2024

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.

laski007 avatar laski007 commented on July 21, 2024

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.

doonny avatar doonny commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.