From 8d8212ea8129347603e60b053f147d6bd0d1f83a Mon Sep 17 00:00:00 2001 From: tg-at-google <taregaskin@google.com> Date: Tue, 16 Jun 2020 21:31:09 -0400 Subject: [PATCH] Update quantization_config.cc --- .../mlir/lite/quantization/quantization_config.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorflow/compiler/mlir/lite/quantization/quantization_config.cc b/tensorflow/compiler/mlir/lite/quantization/quantization_config.cc index cdff93502f2..08cc29dd647 100644 --- a/tensorflow/compiler/mlir/lite/quantization/quantization_config.cc +++ b/tensorflow/compiler/mlir/lite/quantization/quantization_config.cc @@ -48,9 +48,9 @@ bool ParseInputNodeQuantSpecs(absl::string_view node_names, std::vector<double> node_mins; if (!min_values.empty()) { std::vector<std::string> node_mins_str = absl::StrSplit(min_values, ','); - for (const std::string&node_min : node_mins_str.size()) { + for (int i = 0, e = node_mins_str.size(); i < e; i++) { double value; - if (!absl::SimpleAtod(node_min, &value)) { + if (!absl::SimpleAtod(node_mins_str[i], &value)) { return true; } node_mins.push_back(value); @@ -60,9 +60,9 @@ bool ParseInputNodeQuantSpecs(absl::string_view node_names, std::vector<double> node_maxs; if (!max_values.empty()) { std::vector<std::string> node_maxs_str = absl::StrSplit(max_values, ','); - for (const std::string&node_max : node_maxs_str.size()) { + for (int i = 0, e = node_maxs_str.size(); i < e; i++) { double value; - if (!absl::SimpleAtod(node_max, &value)) { + if (!absl::SimpleAtod(node_maxs_str[i], &value)) { llvm::errs() << "Unexpected mins: " << node_maxs_str[i] << "\n"; return true; }