diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-04-04 12:08:49 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-04-04 12:11:49 -0700 |
commit | 13e103b8f0dcc89673dd0d3d589b976c05c37a09 (patch) | |
tree | 3debee5abeae72842052b360124504c5a62e9779 /tensorflow/tools/graph_transforms/freeze_requantization_ranges.cc | |
parent | bd540c8c45bf66a9c14af38a272840b47731b91a (diff) |
Replaced calls to deprecated tensorflow::StringPiece methods with their
tensorflow::str_util equivalents.
This will allow the deprecated methods to be removed.
PiperOrigin-RevId: 191627087
Diffstat (limited to 'tensorflow/tools/graph_transforms/freeze_requantization_ranges.cc')
-rw-r--r-- | tensorflow/tools/graph_transforms/freeze_requantization_ranges.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tensorflow/tools/graph_transforms/freeze_requantization_ranges.cc b/tensorflow/tools/graph_transforms/freeze_requantization_ranges.cc index 2436c7e4a2..f401723808 100644 --- a/tensorflow/tools/graph_transforms/freeze_requantization_ranges.cc +++ b/tensorflow/tools/graph_transforms/freeze_requantization_ranges.cc @@ -40,8 +40,8 @@ Status ExtractMinMaxRecords(const string& log_file_name, for (const string& file_line : file_lines) { // We expect to find a line with components separated by semicolons, so to // start make sure that the basic structure is in place/ - StringPiece line(file_line); - if (!line.contains(print_suffix + ";" + requant_prefix)) { + if (!str_util::StrContains(file_line, + print_suffix + ";" + requant_prefix)) { continue; } std::vector<string> line_parts = str_util::Split(file_line, ';'); @@ -53,8 +53,7 @@ Status ExtractMinMaxRecords(const string& log_file_name, bool min_max_found = false; int min_max_index; for (int i = 1; i < line_parts.size(); ++i) { - StringPiece line_part(line_parts[i]); - if (line_part.starts_with(requant_prefix)) { + if (str_util::StartsWith(line_parts[i], requant_prefix)) { min_max_found = true; min_max_index = i; } @@ -90,7 +89,7 @@ Status ExtractMinMaxRecords(const string& log_file_name, continue; } StringPiece name_string = line_parts[min_max_index - 1]; - if (!name_string.ends_with(print_suffix)) { + if (!str_util::EndsWith(name_string, print_suffix)) { continue; } string name = |