Comments (9)
Hi. Can I just ask which code this issue refers to as the TFL int16 reference code.
If it is reference_ops::Tanh() that calls gemlowp::tanh() then this has a difference of 6 for sigmoid and 12 for tanh for int16 Q12 input.
However, I think TFLite no longer uses this for reference for int16 tanh and now uses reference_integer_ops::Tanh() that is more accurate, within I think +/-1 for int16 Q12
(for example https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/kernels/activations.cc#L945)
So, I do not think that TFLite int16 has an issue with Tanh/sigmoid precision.
from tflite-micro.
Assigning to myself, though I haven't had a chance to investigate this yet.
from tflite-micro.
This is a micro related issue,Please post this in micro repository and move this issue to closed status .Thanks!
from tflite-micro.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.
from tflite-micro.
Can you please move this issue to tflite-micro github?
from tflite-micro.
@petewarden :A Gentle reminder.!
from tflite-micro.
@petewarden :A Gentle reminder.!
done
from tflite-micro.
Hi,
We tested reference_integer_ops::Logistic() & reference_integer_ops::Tanh() for all possible Q12 inputs.
reference_integer_ops::Logistic() is just 1 bit off for Q12 inputs.
But reference_integer_ops::Tanh() is 2 bit off for Q12 inputs and this difference increases from 2 bit to 4 bit when the input changes from Q12 to Q15.
from tflite-micro.
I dug a little deeper and found this:
So for Int16, 4 bits of error (2^-12) is actually expected for the TFLite implementation based on trade-off of accuracy and time/memory cost.
I will try to port the TFLite tests for int16 tanh and sigmoid (logistic) over to TFLM.
from tflite-micro.
Related Issues (20)
- TFLM compression changes
- build: C++17 is not enabled on all platforms HOT 3
- log32 overflow ? HOT 2
- TFLM compression changes (2nd)
- TFLITE micro ERROR An error occurred during the fetch of repository 'tflm_pip_deps_numpy' HOT 2
- TFLM compression changes (3rd)
- Impossible to compile with recent GCC HOT 1
- TFLM implementation in Contiki-NG HOT 1
- TFLM compression changes (4th) HOT 1
- Cortex-M CI Run Failed HOT 3
- Quantisize LSTM Model HOT 5
- Python dependency issue for aarch64 HOT 1
- While OP Issue in TFLM
- Custom memory allocation/planning that may not be that custom HOT 3
- Does TFLM support MFCC? HOT 2
- Training person detection model. HOT 1
- Add int16 support to MINIMUM and MAXIMUM HOT 2
- Fail to run person_detect.tflite via TFLite benchmark_model HOT 2
- Add int16 support to RELU6
- Rename tflite namespace HOT 1
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 tflite-micro.