Home
last modified time | relevance | path

Searched refs:zero_point (Results 1 – 2 of 2) sorted by relevance

/external/gemmlowp/doc/
Dquantization_example.cc66 std::uint8_t zero_point; member
110 result.zero_point = nudged_zero_point; in ChooseQuantizationParams()
138 const float transformed_val = qparams.zero_point + real_val / qparams.scale; in Quantize()
149 (*dst)[i] = qparams.scale * (quantized_val - qparams.zero_point); in Dequantize()
309 << ", zero_point = " << static_cast<float>(lhs_qparams.zero_point) in main()
313 << ", zero_point = " << static_cast<float>(rhs_qparams.zero_point) in main()
318 << static_cast<float>(result_qparams.zero_point) << std::endl; in main()
332 const int lhs_offset = -lhs_qparams.zero_point; in main()
333 const int rhs_offset = -rhs_qparams.zero_point; in main()
334 const int result_offset = result_qparams.zero_point; in main()
Dquantization.md80 In equation (1), plugging `real_value = 0` and `quantized_value = zero_point`,
84 0 = A * zero_point + B
90 zero_point = -B / A
95 `zero_point` can be exactly equal to it. Quite awkward!
98 `quantized_value = zero_point`, we get:
101 0 = C * (zero_point + D)
108 0 = zero_point + D
111 In other words, `D = -zero_point`. This suggests rewriting the quantization
116 real_value = scale * (quantized_value - zero_point) (3)
120 `-zero_point`.
[all …]