Home
last modified time | relevance | path

Searched refs:affine_quantization (Results 1 – 7 of 7) sorted by relevance

/external/tensorflow/tensorflow/lite/kernels/
Dkernel_util.cc56 const auto* affine_quantization = in PopulateConvolutionQuantizationParams() local
58 TF_LITE_ENSURE(context, affine_quantization); in PopulateConvolutionQuantizationParams()
59 TF_LITE_ENSURE(context, affine_quantization->scale); in PopulateConvolutionQuantizationParams()
60 const bool is_per_channel = affine_quantization->scale->size > 1; in PopulateConvolutionQuantizationParams()
66 context, affine_quantization->scale->size, in PopulateConvolutionQuantizationParams()
67 filter->dims->data[affine_quantization->quantized_dimension]); in PopulateConvolutionQuantizationParams()
71 const int num_channels = affine_quantization->scale->size; in PopulateConvolutionQuantizationParams()
74 const float* filter_scales = affine_quantization->scale->data; in PopulateConvolutionQuantizationParams()
Dtest_util.h458 auto* affine_quantization = reinterpret_cast<TfLiteAffineQuantization*>( in QuantizeTensor() local
460 affine_quantization->quantized_dimension = 0; in QuantizeTensor()
461 affine_quantization->scale = TfLiteFloatArrayCreate(1); in QuantizeTensor()
462 affine_quantization->zero_point = TfLiteIntArrayCreate(1); in QuantizeTensor()
463 affine_quantization->scale->data[0] = scaling_factor; in QuantizeTensor()
464 affine_quantization->zero_point->data[0] = 0; in QuantizeTensor()
465 t->quantization.params = affine_quantization; in QuantizeTensor()
Ddepthwise_conv.cc164 const auto* affine_quantization = in Prepare() local
167 TF_LITE_ENSURE(context, affine_quantization); in Prepare()
168 TF_LITE_ENSURE(context, affine_quantization->scale); in Prepare()
169 const int number_channel = affine_quantization->scale->size; in Prepare()
Dconv.cc311 const auto* affine_quantization = in Prepare() local
314 TF_LITE_ENSURE(context, affine_quantization); in Prepare()
315 TF_LITE_ENSURE(context, affine_quantization->scale); in Prepare()
316 const int number_channel = affine_quantization->scale->size; in Prepare()
/external/tensorflow/tensorflow/lite/
Dinterpreter.cc44 auto* affine_quantization = reinterpret_cast<TfLiteAffineQuantization*>( in GetQuantizationFromLegacy() local
46 affine_quantization->scale = TfLiteFloatArrayCreate(1); in GetQuantizationFromLegacy()
47 affine_quantization->zero_point = TfLiteIntArrayCreate(1); in GetQuantizationFromLegacy()
48 affine_quantization->scale->data[0] = legacy_quantization.scale; in GetQuantizationFromLegacy()
49 affine_quantization->zero_point->data[0] = legacy_quantization.zero_point; in GetQuantizationFromLegacy()
50 quantization.params = affine_quantization; in GetQuantizationFromLegacy()
Dmodel.cc329 auto* affine_quantization = reinterpret_cast<TfLiteAffineQuantization*>( in ParseQuantization() local
332 affine_quantization->scale = TfLiteFloatArrayCreate(num_scales); in ParseQuantization()
333 affine_quantization->zero_point = TfLiteIntArrayCreate(num_scales); in ParseQuantization()
335 affine_quantization->scale->data[i] = src_quantization->scale()->Get(i); in ParseQuantization()
336 affine_quantization->zero_point->data[i] = in ParseQuantization()
346 affine_quantization->quantized_dimension = in ParseQuantization()
348 quantization->params = reinterpret_cast<void*>(affine_quantization); in ParseQuantization()
/external/tensorflow/tensorflow/lite/core/
Dsubgraph.cc88 auto* affine_quantization = in GetLegacyQuantization() local
90 if (!affine_quantization || !affine_quantization->scale || in GetLegacyQuantization()
91 !affine_quantization->zero_point || in GetLegacyQuantization()
92 affine_quantization->scale->size != 1 || in GetLegacyQuantization()
93 affine_quantization->zero_point->size != 1) { in GetLegacyQuantization()
98 legacy_quantization.scale = affine_quantization->scale->data[0]; in GetLegacyQuantization()
99 legacy_quantization.zero_point = affine_quantization->zero_point->data[0]; in GetLegacyQuantization()