Home
last modified time | relevance | path

Searched refs:nudged_zero_point (Results 1 – 5 of 5) sorted by relevance

/external/tensorflow/tensorflow/lite/kernels/internal/
Dquantization_util.h81 T nudged_zero_point = 0; in ChooseQuantizationParams() local
83 nudged_zero_point = qmin; in ChooseQuantizationParams()
85 nudged_zero_point = qmax; in ChooseQuantizationParams()
87 nudged_zero_point = static_cast<T>(round(zero_point_double)); in ChooseQuantizationParams()
91 TFLITE_CHECK_GE(nudged_zero_point, qmin); in ChooseQuantizationParams()
92 TFLITE_CHECK_LE(nudged_zero_point, qmax); in ChooseQuantizationParams()
96 quantization_params.zero_point = nudged_zero_point; in ChooseQuantizationParams()
Dquantization_util.cc328 uint16 nudged_zero_point; in NudgeQuantizationRange() local
330 nudged_zero_point = static_cast<uint16>(quant_min); in NudgeQuantizationRange()
332 nudged_zero_point = static_cast<uint16>(quant_max); in NudgeQuantizationRange()
334 nudged_zero_point = static_cast<uint16>(TfLiteRound(zero_point_from_min)); in NudgeQuantizationRange()
336 *nudged_min = (quant_min_float - nudged_zero_point) * (*nudged_scale); in NudgeQuantizationRange()
337 *nudged_max = (quant_max_float - nudged_zero_point) * (*nudged_scale); in NudgeQuantizationRange()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dfake_quantize_ops.cc34 float nudged_zero_point; in CpuNudge() local
36 nudged_zero_point = quant_min; in CpuNudge()
38 nudged_zero_point = quant_max; in CpuNudge()
40 nudged_zero_point = std::round(zero_point_from_min); in CpuNudge()
43 *nudged_min = (quant_min - nudged_zero_point) * (*scale); in CpuNudge()
44 *nudged_max = (quant_max - nudged_zero_point) * (*scale); in CpuNudge()
61 xla::XlaOp nudged_zero_point = in XlaNudge() local
65 *nudged_min = xla::Mul(xla::Sub(quant_min, nudged_zero_point), *scale); in XlaNudge()
66 *nudged_max = xla::Mul(xla::Sub(quant_max, nudged_zero_point), *scale); in XlaNudge()
/external/gemmlowp/doc/
Dquantization_example.cc98 std::uint8_t nudged_zero_point = 0; in ChooseQuantizationParams() local
100 nudged_zero_point = qmin; in ChooseQuantizationParams()
102 nudged_zero_point = qmax; in ChooseQuantizationParams()
104 nudged_zero_point = in ChooseQuantizationParams()
110 result.zero_point = nudged_zero_point; in ChooseQuantizationParams()
/external/tensorflow/tensorflow/core/kernels/
Dfake_quant_ops_functor.h48 const uint16 nudged_zero_point = [zero_point_from_min, quant_min, in Nudge()
59 *nudged_min = (quant_min_float - nudged_zero_point) * (*scale); in Nudge()
60 *nudged_max = (quant_max_float - nudged_zero_point) * (*scale); in Nudge()