From 7c39403bc7c1b7cf19b0339c635ad3ab90b3b7e4 Mon Sep 17 00:00:00 2001 From: Feng Liu Date: Tue, 5 May 2020 00:42:42 -0700 Subject: [PATCH] Use the calculated activation range in depthwise_conv PiperOrigin-RevId: 309897016 Change-Id: I861ad3e3fd25a3c06ae57cfe51a4c0b9ad537639 --- tensorflow/lite/kernels/depthwise_conv.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tensorflow/lite/kernels/depthwise_conv.cc b/tensorflow/lite/kernels/depthwise_conv.cc index 34d0556e7bd..8500b5cd39b 100644 --- a/tensorflow/lite/kernels/depthwise_conv.cc +++ b/tensorflow/lite/kernels/depthwise_conv.cc @@ -379,9 +379,8 @@ TfLiteStatus EvalQuantizedPerChannel(TfLiteContext* context, TfLiteNode* node, op_params.input_offset = -input->params.zero_point; op_params.weights_offset = 0; op_params.output_offset = output->params.zero_point; - // TODO(b/130439627): Use calculated value for clamping. - op_params.quantized_activation_min = std::numeric_limits::min(); - op_params.quantized_activation_max = std::numeric_limits::max(); + op_params.quantized_activation_min = data->output_activation_min; + op_params.quantized_activation_max = data->output_activation_max; TF_LITE_ENSURE_STATUS(ComputeDepthMultiplier(context, input, filter, &op_params.depth_multiplier));