aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-07-24 15:32:45 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-24 15:36:47 -0700
commit74d4bd78363b75538ce3aa7ec5ec20678da69c28 (patch)
treeeb80fce58245fd69902bd4875b508b86e7d166c2 /tensorflow/contrib/lite
parentba4ccc83adc397936ac01f80dd04ee8b2686c929 (diff)
Internal Change
PiperOrigin-RevId: 205903203
Diffstat (limited to 'tensorflow/contrib/lite')
-rw-r--r--tensorflow/contrib/lite/testing/BUILD11
-rw-r--r--tensorflow/contrib/lite/testing/generate_testspec.cc12
-rw-r--r--tensorflow/contrib/lite/testing/generate_testspec.h2
-rw-r--r--tensorflow/contrib/lite/testing/join.h3
-rw-r--r--tensorflow/contrib/lite/testing/test_runner.h2
-rw-r--r--tensorflow/contrib/lite/testing/tf_driver.cc4
-rw-r--r--tensorflow/contrib/lite/testing/tflite_diff_flags.h2
7 files changed, 18 insertions, 18 deletions
diff --git a/tensorflow/contrib/lite/testing/BUILD b/tensorflow/contrib/lite/testing/BUILD
index 4c37bcb3c9..6c7f494e9b 100644
--- a/tensorflow/contrib/lite/testing/BUILD
+++ b/tensorflow/contrib/lite/testing/BUILD
@@ -112,7 +112,6 @@ cc_library(
cc_test(
name = "message_test",
srcs = ["message_test.cc"],
- tags = ["no_oss"],
deps = [
":message",
"@com_google_googletest//:gtest_main",
@@ -132,7 +131,6 @@ cc_test(
name = "split_test",
size = "small",
srcs = ["split_test.cc"],
- tags = ["no_oss"],
deps = [
":split",
"@com_google_googletest//:gtest_main",
@@ -142,13 +140,13 @@ cc_test(
cc_library(
name = "join",
hdrs = ["join.h"],
+ deps = ["//tensorflow/contrib/lite:string"],
)
cc_test(
name = "join_test",
size = "small",
srcs = ["join_test.cc"],
- tags = ["no_oss"],
deps = [
":join",
"@com_google_googletest//:gtest_main",
@@ -174,7 +172,6 @@ cc_test(
srcs = ["tflite_driver_test.cc"],
data = ["//tensorflow/contrib/lite:testdata/multi_add.bin"],
tags = [
- "no_oss",
"tflite_not_portable_android",
"tflite_not_portable_ios",
],
@@ -196,7 +193,6 @@ cc_library(
cc_test(
name = "tokenize_test",
srcs = ["tokenize_test.cc"],
- tags = ["no_oss"],
deps = [
":tokenize",
"@com_google_googletest//:gtest_main",
@@ -219,7 +215,6 @@ cc_library(
cc_test(
name = "test_runner_test",
srcs = ["test_runner_test.cc"],
- tags = ["no_oss"],
deps = [
":test_runner",
"@com_google_googletest//:gtest_main",
@@ -258,7 +253,6 @@ cc_test(
srcs = ["tf_driver_test.cc"],
data = ["//tensorflow/contrib/lite:testdata/multi_add.pb"],
tags = [
- "no_oss",
"tflite_not_portable",
],
deps = [
@@ -275,6 +269,7 @@ cc_library(
":join",
":split",
":tf_driver",
+ "//tensorflow/contrib/lite:string",
"//tensorflow/core:framework",
],
)
@@ -284,7 +279,6 @@ cc_test(
size = "small",
srcs = ["generate_testspec_test.cc"],
tags = [
- "no_oss",
"tflite_not_portable",
],
deps = [
@@ -341,7 +335,6 @@ tf_cc_test(
],
tags = [
"no_cuda_on_cpu_tap",
- "no_oss",
"tflite_not_portable",
],
deps = [
diff --git a/tensorflow/contrib/lite/testing/generate_testspec.cc b/tensorflow/contrib/lite/testing/generate_testspec.cc
index c1092e4d25..f29c188e6c 100644
--- a/tensorflow/contrib/lite/testing/generate_testspec.cc
+++ b/tensorflow/contrib/lite/testing/generate_testspec.cc
@@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
+#include <iostream>
+
#include "tensorflow/contrib/lite/testing/generate_testspec.h"
#include "tensorflow/contrib/lite/testing/join.h"
#include "tensorflow/contrib/lite/testing/split.h"
@@ -88,13 +90,13 @@ bool GenerateTestSpecFromTensorflowModel(
TfDriver runner(input_layer, input_layer_type, input_layer_shape,
output_layer);
if (!runner.IsValid()) {
- cerr << runner.GetErrorMessage() << endl;
+ std::cerr << runner.GetErrorMessage() << std::endl;
return false;
}
runner.LoadModel(tensorflow_model_path);
if (!runner.IsValid()) {
- cerr << runner.GetErrorMessage() << endl;
+ std::cerr << runner.GetErrorMessage() << std::endl;
return false;
}
@@ -118,14 +120,14 @@ bool GenerateTestSpecFromTensorflowModel(
for (int j = 0; j < input_values.size(); j++) {
runner.SetInput(j, input_values[j]);
if (!runner.IsValid()) {
- cerr << runner.GetErrorMessage() << endl;
+ std::cerr << runner.GetErrorMessage() << std::endl;
return false;
}
}
runner.Invoke();
if (!runner.IsValid()) {
- cerr << runner.GetErrorMessage() << endl;
+ std::cerr << runner.GetErrorMessage() << std::endl;
return false;
}
@@ -137,7 +139,7 @@ bool GenerateTestSpecFromTensorflowModel(
for (int j = 0; j < output_layer.size(); j++) {
stream << " output: \"" << runner.ReadOutput(j) << "\"\n";
if (!runner.IsValid()) {
- cerr << runner.GetErrorMessage() << endl;
+ std::cerr << runner.GetErrorMessage() << std::endl;
return false;
}
}
diff --git a/tensorflow/contrib/lite/testing/generate_testspec.h b/tensorflow/contrib/lite/testing/generate_testspec.h
index bfaf5e7ec8..b3d0db31c0 100644
--- a/tensorflow/contrib/lite/testing/generate_testspec.h
+++ b/tensorflow/contrib/lite/testing/generate_testspec.h
@@ -19,6 +19,8 @@ limitations under the License.
#include <iostream>
#include <vector>
+#include "tensorflow/contrib/lite/string.h"
+
namespace tflite {
namespace testing {
diff --git a/tensorflow/contrib/lite/testing/join.h b/tensorflow/contrib/lite/testing/join.h
index 1edee01cf9..4be19ad756 100644
--- a/tensorflow/contrib/lite/testing/join.h
+++ b/tensorflow/contrib/lite/testing/join.h
@@ -17,7 +17,8 @@ limitations under the License.
#include <cstdlib>
#include <sstream>
-#include <string>
+
+#include "tensorflow/contrib/lite/string.h"
namespace tflite {
namespace testing {
diff --git a/tensorflow/contrib/lite/testing/test_runner.h b/tensorflow/contrib/lite/testing/test_runner.h
index 96ab6be54e..fac7d01aab 100644
--- a/tensorflow/contrib/lite/testing/test_runner.h
+++ b/tensorflow/contrib/lite/testing/test_runner.h
@@ -90,7 +90,7 @@ class TestRunner {
// Invalidate the test runner, preventing it from executing any further.
void Invalidate(const string& error_message) {
- cerr << error_message << std::endl;
+ std::cerr << error_message << std::endl;
error_message_ = error_message;
}
bool IsValid() const { return error_message_.empty(); }
diff --git a/tensorflow/contrib/lite/testing/tf_driver.cc b/tensorflow/contrib/lite/testing/tf_driver.cc
index 3b27f6f3da..d6a6ff8f56 100644
--- a/tensorflow/contrib/lite/testing/tf_driver.cc
+++ b/tensorflow/contrib/lite/testing/tf_driver.cc
@@ -28,8 +28,8 @@ namespace {
tensorflow::Tensor CreateTensor(const tensorflow::DataType type,
const std::vector<int64_t>& dim) {
- tensorflow::TensorShape shape{gtl::ArraySlice<int64>{
- reinterpret_cast<const int64*>(dim.data()), dim.size()}};
+ tensorflow::TensorShape shape{tensorflow::gtl::ArraySlice<tensorflow::int64>{
+ reinterpret_cast<const tensorflow::int64*>(dim.data()), dim.size()}};
return {type, shape};
}
diff --git a/tensorflow/contrib/lite/testing/tflite_diff_flags.h b/tensorflow/contrib/lite/testing/tflite_diff_flags.h
index 7a57e8d3fb..695c2a3de6 100644
--- a/tensorflow/contrib/lite/testing/tflite_diff_flags.h
+++ b/tensorflow/contrib/lite/testing/tflite_diff_flags.h
@@ -15,6 +15,8 @@ limitations under the License.
#ifndef TENSORFLOW_CONTRIB_LITE_TESTING_TFLITE_DIFF_FLAGS_H_
#define TENSORFLOW_CONTRIB_LITE_TESTING_TFLITE_DIFF_FLAGS_H_
+#include <cstring>
+
#include "tensorflow/contrib/lite/testing/split.h"
#include "tensorflow/contrib/lite/testing/tflite_diff_util.h"
#include "tensorflow/core/util/command_line_flags.h"