diff options
author | 2017-11-10 17:49:41 -0800 | |
---|---|---|
committer | 2017-11-10 19:20:45 -0800 | |
commit | 973987fbe2d9448e15f6efa613aae090703457e0 (patch) | |
tree | 4ab12c2ff623fc7577cc3898dd6b080c6cd1725e /tensorflow/contrib/lite/models | |
parent | 2627e3fcd363187a790dc736a38cc3d61ee429dc (diff) |
Remove dep to file/base:path
PiperOrigin-RevId: 175362138
Diffstat (limited to 'tensorflow/contrib/lite/models')
4 files changed, 15 insertions, 16 deletions
diff --git a/tensorflow/contrib/lite/models/speech_hotword_model_test.cc b/tensorflow/contrib/lite/models/speech_hotword_model_test.cc index f5d1f436bc..0b8266447a 100644 --- a/tensorflow/contrib/lite/models/speech_hotword_model_test.cc +++ b/tensorflow/contrib/lite/models/speech_hotword_model_test.cc @@ -20,9 +20,9 @@ limitations under the License. #include <string> #include "base/logging.h" -#include "file/base/path.h" #include "testing/base/public/googletest.h" #include <gtest/gtest.h> +#include "absl/strings/str_cat.h" #include "tensorflow/contrib/lite/context.h" #include "tensorflow/contrib/lite/interpreter.h" #include "tensorflow/contrib/lite/kernels/register.h" @@ -36,7 +36,7 @@ void RunTest(int model_input_tensor, int svdf_layer_state_tensor, int model_output_tensor, const string& model_name, const string& golden_in_name, const string& golden_out_name) { // Read the model. - string tflite_file_path = file::JoinPath(TestDataPath(), model_name); + string tflite_file_path = StrCat(TestDataPath(), "/", model_name); auto model = FlatBufferModel::BuildFromFile(tflite_file_path.c_str()); CHECK(model) << "Failed to read model from file " << tflite_file_path; @@ -53,13 +53,12 @@ void RunTest(int model_input_tensor, int svdf_layer_state_tensor, // Load the input frames. Frames input_frames; - const string input_file_path = file::JoinPath(TestDataPath(), golden_in_name); + const string input_file_path = StrCat(TestDataPath(), "/", golden_in_name); ReadFrames(input_file_path, &input_frames); // Load the golden output results. Frames output_frames; - const string output_file_path = - file::JoinPath(TestDataPath(), golden_out_name); + const string output_file_path = StrCat(TestDataPath(), "/", golden_out_name); ReadFrames(output_file_path, &output_frames); const int speech_batch_size = diff --git a/tensorflow/contrib/lite/models/speech_speakerid_model_test.cc b/tensorflow/contrib/lite/models/speech_speakerid_model_test.cc index 687cfab0b2..9da0fb1fc6 100644 --- a/tensorflow/contrib/lite/models/speech_speakerid_model_test.cc +++ b/tensorflow/contrib/lite/models/speech_speakerid_model_test.cc @@ -20,9 +20,9 @@ limitations under the License. #include <string> #include "base/logging.h" -#include "file/base/path.h" #include "testing/base/public/googletest.h" #include <gtest/gtest.h> +#include "absl/strings/str_cat.h" #include "tensorflow/contrib/lite/context.h" #include "tensorflow/contrib/lite/interpreter.h" #include "tensorflow/contrib/lite/model.h" @@ -46,7 +46,7 @@ constexpr int kModelOutputTensor = 66; TEST(SpeechSpeakerId, OkGoogleTest) { // Read the model. string tflite_file_path = - file::JoinPath(TestDataPath(), "speech_speakerid_model.tflite"); + StrCat(TestDataPath(), "/", "speech_speakerid_model.tflite"); auto model = FlatBufferModel::BuildFromFile(tflite_file_path.c_str()); CHECK(model) << "Failed to read model from file " << tflite_file_path; @@ -61,13 +61,13 @@ TEST(SpeechSpeakerId, OkGoogleTest) { // Load the input frames. Frames input_frames; const string input_file_path = - file::JoinPath(TestDataPath(), "speech_speakerid_model_in.csv"); + StrCat(TestDataPath(), "/", "speech_speakerid_model_in.csv"); ReadFrames(input_file_path, &input_frames); // Load the golden output results. Frames output_frames; const string output_file_path = - file::JoinPath(TestDataPath(), "speech_speakerid_model_out.csv"); + StrCat(TestDataPath(), "/", "speech_speakerid_model_out.csv"); ReadFrames(output_file_path, &output_frames); const int speech_batch_size = diff --git a/tensorflow/contrib/lite/models/speech_tts_model_test.cc b/tensorflow/contrib/lite/models/speech_tts_model_test.cc index e6f2673a42..8829177689 100644 --- a/tensorflow/contrib/lite/models/speech_tts_model_test.cc +++ b/tensorflow/contrib/lite/models/speech_tts_model_test.cc @@ -20,9 +20,9 @@ limitations under the License. #include <string> #include "base/logging.h" -#include "file/base/path.h" #include "testing/base/public/googletest.h" #include <gtest/gtest.h> +#include "absl/strings/str_cat.h" #include "tensorflow/contrib/lite/context.h" #include "tensorflow/contrib/lite/interpreter.h" #include "tensorflow/contrib/lite/kernels/register.h" @@ -45,7 +45,7 @@ constexpr int kModelOutputTensor = 74; TEST(SpeechTTS, RandomIOTest) { // Read the model. string tflite_file_path = - file::JoinPath(TestDataPath(), "speech_tts_model.tflite"); + StrCat(TestDataPath(), "/", "speech_tts_model.tflite"); auto model = FlatBufferModel::BuildFromFile(tflite_file_path.c_str()); CHECK(model) << "Failed to mmap model " << tflite_file_path; @@ -59,13 +59,13 @@ TEST(SpeechTTS, RandomIOTest) { // Load the input frames. Frames input_frames; const string input_file_path = - file::JoinPath(TestDataPath(), "speech_tts_model_in.csv"); + StrCat(TestDataPath(), "/", "speech_tts_model_in.csv"); ReadFrames(input_file_path, &input_frames); // Load the golden output results. Frames output_frames; const string output_file_path = - file::JoinPath(TestDataPath(), "speech_tts_model_out.csv"); + StrCat(TestDataPath(), "/", "speech_tts_model_out.csv"); ReadFrames(output_file_path, &output_frames); const int speech_batch_size = diff --git a/tensorflow/contrib/lite/models/test_utils.h b/tensorflow/contrib/lite/models/test_utils.h index b2596babd0..1e14c26a35 100644 --- a/tensorflow/contrib/lite/models/test_utils.h +++ b/tensorflow/contrib/lite/models/test_utils.h @@ -30,12 +30,12 @@ using Frames = std::vector<std::vector<float>>; } // namespace tflite #ifndef __ANDROID__ -#include "file/base/path.h" +#include "absl/strings/str_cat.h" #include "tensorflow/core/platform/test.h" inline string TestDataPath() { - return string(file::JoinPath(tensorflow::testing::TensorFlowSrcRoot(), - "contrib/lite/models/testdata/")); + return string(StrCat(tensorflow::testing::TensorFlowSrcRoot(), "/", + "contrib/lite/models/testdata/")); } inline int TestInputSize(const tflite::models::Frames& input_frames) { return input_frames.size(); |