Home
last modified time | relevance | path

Searched refs:quantization_params (Results 1 – 18 of 18) sorted by relevance

/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dquantization_util.cc79 const Array& array, QuantizationParams* quantization_params) { in ChooseQuantizationParamsForArrayAndQuantizedDataType() argument
80 *quantization_params = ::tflite::ChooseQuantizationParams<DataType<A>>( in ChooseQuantizationParamsForArrayAndQuantizedDataType()
86 QuantizationParams* quantization_params) { in ChooseQuantizationParamsForArrayAndQuantizedDataType() argument
90 ArrayDataType::kInt8>(array, quantization_params); in ChooseQuantizationParamsForArrayAndQuantizedDataType()
94 ArrayDataType::kUint8>(array, quantization_params); in ChooseQuantizationParamsForArrayAndQuantizedDataType()
98 ArrayDataType::kInt16>(array, quantization_params); in ChooseQuantizationParamsForArrayAndQuantizedDataType()
102 ArrayDataType::kUint16>(array, quantization_params); in ChooseQuantizationParamsForArrayAndQuantizedDataType()
106 ArrayDataType::kInt32>(array, quantization_params); in ChooseQuantizationParamsForArrayAndQuantizedDataType()
110 ArrayDataType::kUint32>(array, quantization_params); in ChooseQuantizationParamsForArrayAndQuantizedDataType()
114 ArrayDataType::kInt64>(array, quantization_params); in ChooseQuantizationParamsForArrayAndQuantizedDataType()
[all …]
Dquantize.cc186 QuantizationParams* quantization_params) { in ChooseQuantizationForOperatorInput() argument
220 if (!input_activations.quantization_params || in ChooseQuantizationForOperatorInput()
221 !input_weights.quantization_params) { in ChooseQuantizationForOperatorInput()
227 input_activations.quantization_params->scale; in ChooseQuantizationForOperatorInput()
228 const auto input_weights_scale = input_weights.quantization_params->scale; in ChooseQuantizationForOperatorInput()
229 quantization_params->scale = input_activations_scale * input_weights_scale; in ChooseQuantizationForOperatorInput()
230 quantization_params->zero_point = 0; in ChooseQuantizationForOperatorInput()
245 array, *quantized_data_type, quantization_params); in ChooseQuantizationForOperatorInput()
252 array, *quantized_data_type, quantization_params); in ChooseQuantizationForOperatorInput()
257 ArrayDataTypeName(array.final_data_type), quantization_params->zero_point, in ChooseQuantizationForOperatorInput()
[all …]
Dpropagate_fake_quant_num_bits.cc40 if (array->minmax && array->quantization_params) { in ChangeArrayDataType()
57 double min = (old_quantized_min - array->quantization_params->zero_point) * in ChangeArrayDataType()
58 array->quantization_params->scale; in ChangeArrayDataType()
60 (old_quantized_max + 1 - array->quantization_params->zero_point) * in ChangeArrayDataType()
61 array->quantization_params->scale; in ChangeArrayDataType()
72 *array, new_data_type, array->quantization_params.get()); in ChangeArrayDataType()
76 } else if (!array->quantization_params) { in ChangeArrayDataType()
Ddequantize.cc57 CHECK(array->quantization_params); in ClearArrayQuantizationParams()
60 auto& qparams = *array->quantization_params; in ClearArrayQuantizationParams()
75 array->quantization_params = nullptr; in ClearArrayQuantizationParams()
81 if (!array->quantization_params) { in DequantizeArray()
204 input_array.quantization_params = nullptr; in Run()
207 output_array.quantization_params = nullptr; in Run()
Dquantization_util.h45 QuantizationParams* quantization_params);
51 const QuantizationParams& quantization_params);
Dshuffle_fc_weights.cc49 !input_array.quantization_params || !weights_array.quantization_params || in Run()
50 !output_array.quantization_params) { in Run()
Dunfuse_activation_functions.cc73 if (output_array.quantization_params) { in Run()
Dgraph_transformations.cc35 if (array.second->quantization_params) { in PrintModelStats()
Dresolve_constant_concatenation.cc160 if (model->GetArray(input_name).quantization_params) in Run()
/external/tensorflow/tensorflow/lite/kernels/internal/
Dquantization_util.h45 QuantizationParams quantization_params; in ChooseQuantizationParams() local
46 quantization_params.zero_point = 0; in ChooseQuantizationParams()
47 quantization_params.scale = 0.; in ChooseQuantizationParams()
48 return quantization_params; in ChooseQuantizationParams()
95 QuantizationParams quantization_params; in ChooseQuantizationParams() local
96 quantization_params.zero_point = nudged_zero_point; in ChooseQuantizationParams()
97 quantization_params.scale = scale; in ChooseQuantizationParams()
98 return quantization_params; in ChooseQuantizationParams()
/external/tensorflow/tensorflow/lite/tools/optimize/
Dquantization_utils.cc53 QuantizationParametersT* quantization_params) { in GetAsymmetricQuantizationParams() argument
73 quantization_params->min = std::vector<float>(1, min); in GetAsymmetricQuantizationParams()
74 quantization_params->max = std::vector<float>(1, max); in GetAsymmetricQuantizationParams()
75 quantization_params->scale = std::vector<float>(1, scale); in GetAsymmetricQuantizationParams()
76 quantization_params->zero_point = std::vector<int64_t>(1, zero_point); in GetAsymmetricQuantizationParams()
Dquantization_utils.h36 QuantizationParametersT* quantization_params);
/external/tensorflow/tensorflow/lite/toco/
Dtooling_util.cc517 if (array.quantization_params) { in LogArray()
519 << static_cast<int>(array.quantization_params->zero_point) in LogArray()
520 << ", scale=" << array.quantization_params->scale; in LogArray()
776 if (lhs_array.quantization_params || rhs_array.quantization_params) { in HaveSameQuantizationParams()
777 if (!lhs_array.quantization_params || !rhs_array.quantization_params) { in HaveSameQuantizationParams()
780 if (!(*lhs_array.quantization_params == *rhs_array.quantization_params)) { in HaveSameQuantizationParams()
1341 if (source_array.quantization_params) { in CopyArrayAttribs()
1345 target_array->quantization_params.reset(); in CopyArrayAttribs()
1390 if (source_array.quantization_params) { in CloneArray()
2405 if (src.quantization_params) { in CopyMinMaxAndQuantizationRelatedFields()
Dmodel.h2127 if (!quantization_params) {
2128 quantization_params =
2131 return *quantization_params;
2134 DCHECK(quantization_params);
2135 return *quantization_params;
2221 std::unique_ptr<QuantizationParams> quantization_params;
Ddump_graphviz.cc332 if (array.quantization_params) { in GetArrayLabel()
334 array.quantization_params->scale, in GetArrayLabel()
335 array.quantization_params->zero_point); in GetArrayLabel()
/external/tensorflow/tensorflow/lite/experimental/writer/
Dwriter_lib.cc178 Offset<QuantizationParameters> quantization_params = in ExportTensors() local
189 quantization_params, tensor->is_variable)); in ExportTensors()
/external/tensorflow/tensorflow/lite/toco/tflite/
Dexport.cc241 if (array.quantization_params) { in ExportTensors()
243 static_cast<float>(array.quantization_params->scale)}); in ExportTensors()
245 std::vector<int64_t>{array.quantization_params->zero_point}); in ExportTensors()
Dimport_test.cc179 const auto& q = a1.quantization_params; in TEST_F()