/external/tensorflow/tensorflow/core/kernels/ |
D | fake_quant_ops_functor.h | 42 const float min, const float max, const int quant_min, const int quant_max, in Nudge() argument 44 const float quant_min_float = static_cast<float>(quant_min); in Nudge() 48 const uint16 nudged_zero_point = [zero_point_from_min, quant_min, in Nudge() 52 return static_cast<uint16>(quant_min); in Nudge() 81 const float max, const int quant_min, const int quant_max, in operator() 88 Nudge(min, max, quant_min, quant_max, &nudged_min, &nudged_max, in operator() 106 const int quant_min, const int quant_max, in operator() 113 Nudge(min, max, quant_min, quant_max, &nudged_min, &nudged_max, in operator() 129 const int quant_min, const int quant_max, in operator() 139 Nudge(min_val, max_val, quant_min, quant_max, &nudged_min, &nudged_max, in operator() [all …]
|
D | fake_quant_ops.cc | 164 const float min, const float max, const int quant_min, const int quant_max, 174 const int quant_min, const int quant_max, 286 typename TTypes<float>::ConstScalar max, const int quant_min, 300 typename TTypes<float>::ConstScalar max, const int quant_min, 434 typename TTypes<float>::ConstFlat max, const int quant_min, 449 const int quant_min, const int quant_max,
|
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/kernels/ |
D | quantize_and_dequantize_test.cc | 41 const int quant_min = 0; in TEST() local 45 quant_min, quant_max, &attr.min, &attr.max, in TEST() 72 const int quant_min = 0; in TEST() local 76 quant_min, quant_max, &attr.min, &attr.max, in TEST() 103 const int quant_min = 0; in TEST() local 107 quant_min, quant_max, &attr.min, &attr.max, in TEST() 134 const int quant_min = 0; in TEST() local 138 quant_min, quant_max, &attr.min, &attr.max, in TEST()
|
/external/tensorflow/tensorflow/lite/delegates/gpu/common/tasks/ |
D | quantize_and_dequantize_test_util.cc | 35 const int quant_min = 0; in QuantAndDequant_Dim2Bits8Test() local 39 quant_min, quant_max, &attr.min, &attr.max, in QuantAndDequant_Dim2Bits8Test() 72 const int quant_min = 0; in QuantAndDequant_Dim3Bits8_NegativeRangeTest() local 76 quant_min, quant_max, &attr.min, &attr.max, in QuantAndDequant_Dim3Bits8_NegativeRangeTest() 108 const int quant_min = 0; in QuantAndDequant_Dim3Bits16Test() local 112 quant_min, quant_max, &attr.min, &attr.max, in QuantAndDequant_Dim3Bits16Test() 145 const int quant_min = 0; in QuantAndDequant_Dim2Bits16_NegativeRangeTest() local 149 quant_min, quant_max, &attr.min, &attr.max, in QuantAndDequant_Dim2Bits16_NegativeRangeTest()
|
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/ |
D | fake_quantize_ops.cc | 28 void CpuNudge(const float min, const float max, const float quant_min, in CpuNudge() argument 31 *scale = (max - min) / (quant_max - quant_min); in CpuNudge() 33 const float zero_point_from_min = quant_min - min / *scale; in CpuNudge() 35 if (zero_point_from_min <= quant_min) { in CpuNudge() 36 nudged_zero_point = quant_min; in CpuNudge() 43 *nudged_min = (quant_min - nudged_zero_point) * (*scale); in CpuNudge() 56 xla::XlaOp quant_min = in XlaNudge() local 58 xla::XlaOp zero_point_from_min = xla::Sub(quant_min, xla::Div(min, *scale)); in XlaNudge() 62 xla::Select(xla::Le(zero_point_from_min, quant_min), quant_min, in XlaNudge() 65 *nudged_min = xla::Mul(xla::Sub(quant_min, nudged_zero_point), *scale); in XlaNudge() [all …]
|
/external/tensorflow/tensorflow/lite/tools/optimize/ |
D | quantization_utils_test.cc | 79 const int quant_min = -128; in TEST_F() local 82 GetAsymmetricQuantizationParams(float_min, float_max, quant_min, quant_max, in TEST_F() 103 const int quant_min = -128; in TEST_F() local 106 GetAsymmetricQuantizationParams(float_min, float_max, quant_min, quant_max, in TEST_F() 126 const int quant_min = -128; in TEST_F() local 129 GetAsymmetricQuantizationParams(float_min, float_max, quant_min, quant_max, in TEST_F() 147 const int quant_min = -128; in TEST_F() local 150 GetAsymmetricQuantizationParams(float_min, float_max, quant_min, quant_max, in TEST_F() 162 EXPECT_GT(zero_point, quant_min); in TEST_F() 169 const int quant_min = -128; in TEST_F() local [all …]
|
D | quantization_utils.h | 36 float min, float max, const int quant_min, const int quant_max,
|
D | quantization_utils.cc | 62 float min, float max, const int quant_min, const int quant_max, in GetAsymmetricQuantizationParams() argument 64 const float quant_min_float = static_cast<float>(quant_min); in GetAsymmetricQuantizationParams() 77 zero_point = static_cast<int64_t>(quant_min); in GetAsymmetricQuantizationParams()
|
/external/tensorflow/tensorflow/lite/kernels/internal/ |
D | quantization_util.cc | 337 const int quant_min, const int quant_max, in NudgeQuantizationRange() argument 341 const float quant_min_float = static_cast<float>(quant_min); in NudgeQuantizationRange() 347 nudged_zero_point = static_cast<uint16_t>(quant_min); in NudgeQuantizationRange()
|
D | quantization_util.h | 263 const int quant_min, const int quant_max,
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | lower_tf.cc | 356 auto quant_min = rewriter.create<ConstOp>( in matchAndRewrite() local 380 rewriter.create<SubOp>(op.getLoc(), quant_min, min_scaled); in matchAndRewrite() 386 op.getLoc(), scalar_ty, mid_rounded, quant_min, quant_max); in matchAndRewrite() 389 rewriter.create<SubOp>(op.getLoc(), quant_min, nudged_zero_point_val); in matchAndRewrite()
|
/external/tensorflow/tensorflow/lite/kernels/internal/reference/ |
D | reference_ops.h | 1049 int quant_min = 0; in FakeQuant() local 1052 NudgeQuantizationRange(rmin, rmax, quant_min, quant_max, &nudged_min, in FakeQuant()
|