Nit: Create op_params in the smallest scope.

PiperOrigin-RevId: 303149266
Change-Id: I4f98d0dfcfbee6da5bcc5b4fa85b3e17205df481
This commit is contained in:
Robert David 2020-03-26 10:55:13 -07:00 committed by TensorFlower Gardener
parent 568f90e6c1
commit 44430e7dda

View File

@ -49,11 +49,10 @@ TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* input = GetInput(context, node, 0);
TfLiteTensor* output = GetOutput(context, node, 0);
tflite::DequantizationParams op_params;
op_params.zero_point = input->params.zero_point;
op_params.scale = static_cast<double>(input->params.scale);
if (output->type == kTfLiteFloat32) {
tflite::DequantizationParams op_params;
op_params.zero_point = input->params.zero_point;
op_params.scale = static_cast<double>(input->params.scale);
switch (input->type) {
case kTfLiteUInt8:
reference_ops::Dequantize(