diff options
author | Shashi Shekhar <shashishekhar@google.com> | 2018-06-01 10:08:35 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-01 10:11:30 -0700 |
commit | dae529b6cb2a9e0dc9f1f14bed1561d98adf37ca (patch) | |
tree | ba8fc891fd9c3856cace407d99b0211b5353b913 /tensorflow/contrib/lite/profiling | |
parent | 6a7cd2e871d60c675c30b9f0bbe1af8e78b89373 (diff) |
Fix ProfileSummarizer build, use properly qualified string references.
PiperOrigin-RevId: 198887868
Diffstat (limited to 'tensorflow/contrib/lite/profiling')
-rw-r--r-- | tensorflow/contrib/lite/profiling/profile_summarizer.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tensorflow/contrib/lite/profiling/profile_summarizer.cc b/tensorflow/contrib/lite/profiling/profile_summarizer.cc index 788f6922d2..6f2c9cd2b3 100644 --- a/tensorflow/contrib/lite/profiling/profile_summarizer.cc +++ b/tensorflow/contrib/lite/profiling/profile_summarizer.cc @@ -26,21 +26,22 @@ namespace { using Detail = tensorflow::StatsCalculator::Detail; struct OperatorDetails { - string name; - std::vector<string> inputs; - std::vector<string> outputs; + std::string name; + std::vector<std::string> inputs; + std::vector<std::string> outputs; }; -string GetTensorName(const tflite::Interpreter& interpreter, int tensor_index) { +std::string GetTensorName(const tflite::Interpreter& interpreter, + int tensor_index) { const auto tensor = interpreter.tensor(tensor_index); if (tensor == nullptr || tensor->name == nullptr) { return "Unknown"; } return tensor->name; } -std::vector<string> GetTensorNames(const tflite::Interpreter& interpreter, - const TfLiteIntArray* tensor_indices) { - std::vector<string> tensors; +std::vector<std::string> GetTensorNames(const tflite::Interpreter& interpreter, + const TfLiteIntArray* tensor_indices) { + std::vector<std::string> tensors; tensors.reserve(tensor_indices->size); for (int i = 0; i < tensor_indices->size; i++) { tensors.push_back(GetTensorName(interpreter, tensor_indices->data[i])); @@ -48,7 +49,7 @@ std::vector<string> GetTensorNames(const tflite::Interpreter& interpreter, return tensors; } -string ToString(const std::vector<string>& str_vector) { +std::string ToString(const std::vector<std::string>& str_vector) { std::stringstream stream; stream << "["; bool first = true; |