> Not true. When there is activation, the range is not always 0 ~ 255. For 
> example RELU,
I believe tflite extends the quantization range so it always includes 0, as 
done in the gemmlowp quantization example below.  I have dumped my min and max 
saturation input values from the six quantized tflite models (two mobilenets 
and four inceptions).  They are all 0 and 255.


` https://github.com/google/gemmlowp/blob/master/doc/quantization_example.cc `


```
// Given the min and max values of a float array, return
// reasonable quantization parameters to use for this array.
QuantizationParams ChooseQuantizationParams(float min, float max) {
  // We extend the [min, max] interval to ensure that it contains 0.
  // Otherwise, we would not meet the requirement that 0 be an exactly
  // representable value.
  min = std::min(min, 0.f);
  max = std::max(max, 0.f);

```



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dmlc/tvm/issues/2351#issuecomment-502537330

Reply via email to