Comments (1)
Hi John,
The approach is precisely the same, as I mentioned in issue #5. The quantization works as follows: the minimal value is referenced as 0, and the maximal is referenced as 255. And you can simply shift this interval because the data are stored in the bin file sequentially.
But then you will have to shift the result from -32768 to 32768 to interval 0 to 65536.
The only issue of this type of quantization is that 0.0 (float) is not typically expressed as 0.
FILE * f = fopen("output.bin", "wb");
for(unsigned int a = -128; a < 128; a++)
for(unsigned int b = -128; b < 128; b++) {
int16_t val = approximate_mult(a, b); // replace by your own function call
uint16_t val_u = val + 32768;
fwrite(&val_u, sizeof(uint16_t), 1, f);
}
fclose(f);
from tf-approximate.
Related Issues (20)
- GPU evaluate is not work? HOT 2
- [tf2]Does kernel size=(1, 1) work ? HOT 2
- Problem in using the singularity container HOT 4
- Any chance to change addition? HOT 2
- Training
- Changes in approximate convolution
- tf1 compiling error HOT 1
- while running container showing following fatal error HOT 2
- TFapprox build with tensorflow 2.3
- using one Approximate Multiplier HOT 3
- sif file can not be found
- Changes for floating point multiplier HOT 1
- Dead container link HOT 1
- Where is the libApproxGPUOpsTF.so by building from source? HOT 2
- [tf2]How to generate the binary lookup table of approximate multiplier? HOT 7
- Gradient Implementation HOT 2
- Possible bug in IM2COL kernel HOT 1
- Building from source HOT 6
- Gradient registration
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 tf-approximate.