Home
last modified time | relevance | path

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

/external/tensorflow/tensorflow/lite/tools/optimize/
Dquantization_utils.cc61 float zero_point_from_min = quant_min_float; in GetAsymmetricQuantizationParams() local
63 zero_point_from_min = quant_min_float - min / scale; in GetAsymmetricQuantizationParams()
66 if (zero_point_from_min < quant_min_float) { in GetAsymmetricQuantizationParams()
68 } else if (zero_point_from_min > quant_max_float) { in GetAsymmetricQuantizationParams()
71 zero_point = static_cast<int64_t>(std::round(zero_point_from_min)); in GetAsymmetricQuantizationParams()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dfake_quantize_ops.cc33 const float zero_point_from_min = quant_min - min / *scale; in CpuNudge() local
35 if (zero_point_from_min <= quant_min) { in CpuNudge()
37 } else if (zero_point_from_min >= quant_max) { in CpuNudge()
40 nudged_zero_point = std::round(zero_point_from_min); in CpuNudge()
58 xla::XlaOp zero_point_from_min = xla::Sub(quant_min, xla::Div(min, *scale)); in XlaNudge() local
62 xla::Select(xla::Le(zero_point_from_min, quant_min), quant_min, in XlaNudge()
63 xla::Select(xla::Ge(zero_point_from_min, quant_max), in XlaNudge()
64 quant_max, xla::Round(zero_point_from_min))); in XlaNudge()
/external/tensorflow/tensorflow/core/kernels/
Dfake_quant_ops_functor.h47 const float zero_point_from_min = quant_min_float - min / *scale; in Nudge() local
48 const uint16 nudged_zero_point = [zero_point_from_min, quant_min, in Nudge()
51 if (zero_point_from_min < quant_min_float) { in Nudge()
54 if (zero_point_from_min > quant_max_float) { in Nudge()
57 return static_cast<uint16>(StdRound(zero_point_from_min)); in Nudge()
/external/tensorflow/tensorflow/lite/kernels/internal/
Dquantization_util.cc327 const float zero_point_from_min = quant_min_float - min / *nudged_scale; in NudgeQuantizationRange() local
329 if (zero_point_from_min < quant_min_float) { in NudgeQuantizationRange()
331 } else if (zero_point_from_min > quant_max_float) { in NudgeQuantizationRange()
334 nudged_zero_point = static_cast<uint16>(TfLiteRound(zero_point_from_min)); in NudgeQuantizationRange()
Dquantization_util.h64 const double zero_point_from_min = qmin_double - rmin / scale; in ChooseQuantizationParams() local
73 ? zero_point_from_min in ChooseQuantizationParams()