Searched refs:zero_point_from_min (Results 1 – 5 of 5) sorted by relevance
/external/tensorflow/tensorflow/lite/tools/optimize/ |
D | quantization_utils.cc | 61 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/ |
D | fake_quantize_ops.cc | 33 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/ |
D | fake_quant_ops_functor.h | 47 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/ |
D | quantization_util.cc | 327 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()
|
D | quantization_util.h | 64 const double zero_point_from_min = qmin_double - rmin / scale; in ChooseQuantizationParams() local 73 ? zero_point_from_min in ChooseQuantizationParams()
|