/external/tensorflow/tensorflow/lite/toco/graph_transformations/ |
D | quantization_util.cc | 79 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 …]
|
D | quantize.cc | 186 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 …]
|
D | propagate_fake_quant_num_bits.cc | 40 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()
|
D | dequantize.cc | 57 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()
|
D | quantization_util.h | 45 QuantizationParams* quantization_params); 51 const QuantizationParams& quantization_params);
|
D | shuffle_fc_weights.cc | 49 !input_array.quantization_params || !weights_array.quantization_params || in Run() 50 !output_array.quantization_params) { in Run()
|
D | unfuse_activation_functions.cc | 73 if (output_array.quantization_params) { in Run()
|
D | graph_transformations.cc | 35 if (array.second->quantization_params) { in PrintModelStats()
|
D | resolve_constant_concatenation.cc | 160 if (model->GetArray(input_name).quantization_params) in Run()
|
/external/tensorflow/tensorflow/lite/kernels/internal/ |
D | quantization_util.h | 45 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/ |
D | quantization_utils.cc | 53 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()
|
D | quantization_utils.h | 36 QuantizationParametersT* quantization_params);
|
/external/tensorflow/tensorflow/lite/toco/ |
D | tooling_util.cc | 517 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()
|
D | model.h | 2127 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;
|
D | dump_graphviz.cc | 332 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/ |
D | writer_lib.cc | 178 Offset<QuantizationParameters> quantization_params = in ExportTensors() local 189 quantization_params, tensor->is_variable)); in ExportTensors()
|
/external/tensorflow/tensorflow/lite/toco/tflite/ |
D | export.cc | 241 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()
|
D | import_test.cc | 179 const auto& q = a1.quantization_params; in TEST_F()
|