Searched refs:affine_quantization (Results 1 – 7 of 7) sorted by relevance
56 const auto* affine_quantization = in PopulateConvolutionQuantizationParams() local58 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()
458 auto* affine_quantization = reinterpret_cast<TfLiteAffineQuantization*>( in QuantizeTensor() local460 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()
164 const auto* affine_quantization = in Prepare() local167 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()
311 const auto* affine_quantization = in Prepare() local314 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()
44 auto* affine_quantization = reinterpret_cast<TfLiteAffineQuantization*>( in GetQuantizationFromLegacy() local46 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()
329 auto* affine_quantization = reinterpret_cast<TfLiteAffineQuantization*>( in ParseQuantization() local332 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()
88 auto* affine_quantization = in GetLegacyQuantization() local90 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()