/external/gemmlowp/doc/ |
D | quantization_example.cc | 66 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()
|
D | quantization.md | 80 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 …]
|
/external/tensorflow/tensorflow/contrib/lite/kernels/ |
D | test_util.h | 39 int32_t zero_point) { in Quantize() argument 45 static_cast<T>(std::round(zero_point + (f / scale)))))); in Quantize() 52 int32_t zero_point) { in Dequantize() argument 55 f.push_back(scale * (q - zero_point)); in Dequantize() 85 int32_t zero_point; member 132 auto q = Quantize<T>(data, t->params.scale, t->params.zero_point); in QuantizeAndPopulate() 139 int32_t GetZeroPoint(int id) { return tensor_data_.at(id).zero_point; } in GetZeroPoint()
|
D | kernel_util.cc | 51 const auto zero_point = output->params.zero_point; in CalculateActivationRangeUint8() local 53 auto quantize = [scale, zero_point](float f) { in CalculateActivationRangeUint8() 54 return zero_point + static_cast<int32_t>(TfLiteRound(f / scale)); in CalculateActivationRangeUint8()
|
D | concatenation.cc | 71 TF_LITE_ENSURE_EQ(context, t->params.zero_point, t0->params.zero_point); in Prepare() 91 TF_LITE_ENSURE_EQ(context, output->params.zero_point, in Prepare() 92 t0->params.zero_point); in Prepare()
|
D | test_util.cc | 35 int32_t zero_point = std::min( in QuantizationParams() local 38 return {scale, zero_point}; in QuantizationParams() 64 std::tie(t.scale, t.zero_point) = in AddTensor() 67 std::tie(t.scale, t.zero_point) = in AddTensor() 78 builder_.CreateVector<int64_t>({t.zero_point})); in AddTensor()
|
D | depthwise_conv.cc | 112 TF_LITE_ENSURE_EQ(context, bias->params.zero_point, 0); in Prepare() 201 auto input_offset = -input->params.zero_point; in EvalQuantized() 202 auto filter_offset = -filter->params.zero_point; in EvalQuantized() 203 auto output_offset = output->params.zero_point; in EvalQuantized()
|
D | mul.cc | 114 auto input1_offset = -input1->params.zero_point; in EvalQuantized() 115 auto input2_offset = -input2->params.zero_point; in EvalQuantized() 116 auto output_offset = output->params.zero_point; in EvalQuantized()
|
D | add.cc | 114 auto input1_offset = -input1->params.zero_point; in EvalAddQuantized() 115 auto input2_offset = -input2->params.zero_point; in EvalAddQuantized() 116 auto output_offset = output->params.zero_point; in EvalAddQuantized()
|
D | fully_connected.cc | 184 int32_t input_offset = -input->params.zero_point; in EvalQuantized() 185 int32_t filter_offset = -filter->params.zero_point; in EvalQuantized() 186 int32_t output_offset = output->params.zero_point; in EvalQuantized()
|
D | conv.cc | 144 TF_LITE_ENSURE_EQ(context, bias->params.zero_point, 0); in Prepare() 298 auto input_offset = -input->params.zero_point; in EvalQuantized() 299 auto filter_offset = -filter->params.zero_point; in EvalQuantized() 300 auto output_offset = output->params.zero_point; in EvalQuantized()
|
D | activations.cc | 76 TF_LITE_ENSURE_EQ(context, output->params.zero_point, 0); in SigmoidPrepare() 110 TF_LITE_ENSURE_EQ(context, output->params.zero_point, 0); in SoftmaxPrepare() 218 input->params.zero_point, data->input_range_radius, in SigmoidEval()
|
D | pooling.cc | 105 TF_LITE_ENSURE_EQ(context, input->params.zero_point, in GenericPrepare() 106 output->params.zero_point); in GenericPrepare()
|
/external/tensorflow/tensorflow/contrib/lite/toco/graph_transformations/ |
D | quantize.cc | 74 scaled_val = quantization_params.zero_point; in QuantizeBuffer() 76 scaled_val = quantization_params.zero_point + inverse_scale * src_val; in QuantizeBuffer() 214 quantization_params->zero_point = 0; in ChooseQuantizationForOperatorInput() 241 input, minmax.min, minmax.max, quantization_params->zero_point, in ChooseQuantizationForOperatorInput() 250 quantization_params.zero_point + real_value / quantization_params.scale; in IsExactlyRepresentable() 273 quantization_params->zero_point = 128; in ChooseHardcodedQuantizationForOperatorOutput() 288 quantization_params->zero_point = 0; in ChooseHardcodedQuantizationForOperatorOutput() 297 quantization_params->zero_point = 128; in ChooseHardcodedQuantizationForOperatorOutput() 332 quantization_params->zero_point = input_quantization_params.zero_point; in ChooseQuantizationForOperatorOutput() 358 output, minmax.min, minmax.max, quantization_params->zero_point, in ChooseQuantizationForOperatorOutput()
|
D | remove_trivial_quantized_activation_func.cc | 51 (0. - quantization_params.zero_point) * quantization_params.scale; in Run() 63 (255. - quantization_params.zero_point) * quantization_params.scale; in Run()
|
D | resolve_constant_fake_quant.cc | 63 std::round(qparams.zero_point + src_val / qparams.scale); in Run() 66 const double dst_val = qparams.scale * (quantized_val - qparams.zero_point); in Run()
|
D | dequantize.cc | 39 new_data[i] = qparams.scale * (old_data[i] - qparams.zero_point); in DequantizeBuffer() 62 const double new_mean_value = qparams.zero_point; in ClearArrayQuantizationParams()
|
/external/tensorflow/tensorflow/contrib/lite/toco/tflite/ |
D | import.cc | 84 if (quantization->scale() && quantization->zero_point()) { in ImportTensors() 86 CHECK_EQ(1, quantization->zero_point()->Length()); in ImportTensors() 89 q.zero_point = quantization->zero_point()->Get(0); in ImportTensors()
|
D | export.cc | 117 Offset<Vector<int64_t>> zero_point; in ExportTensors() local 127 zero_point = builder->CreateVector( in ExportTensors() 128 std::vector<int64_t>{array.quantization_params->zero_point}); in ExportTensors() 131 scale, zero_point); in ExportTensors()
|
/external/tensorflow/tensorflow/contrib/lite/ |
D | model.cc | 640 quantization.zero_point = 0; in ParseTensors() 648 if (q_params->zero_point()) in ParseTensors() 649 quantization.zero_point = q_params->zero_point()->Get(0); in ParseTensors()
|
D | nnapi_delegate.cc | 93 zeroPoint = tensor->params.zero_point; in addTensorOperands() 102 zeroPoint = tensor->params.zero_point; in addTensorOperands()
|
/external/tensorflow/tensorflow/contrib/lite/toco/ |
D | tooling_util.h | 163 quantization_params->zero_point = 0; 212 quantization_params->zero_point = nudged_zero_point;
|
/external/tensorflow/tensorflow/contrib/lite/schema/ |
D | schema_v0.fbs | 28 // f = scale * (q - zero_point) 33 zero_point:[long];
|
D | schema_v2.fbs | 34 // f = scale * (q - zero_point) 39 zero_point:[long];
|
D | schema_v1.fbs | 33 // f = scale * (q - zero_point) 38 zero_point:[long];
|