diff options
3 files changed, 20 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/tools/accuracy/BUILD b/tensorflow/contrib/lite/tools/accuracy/BUILD index 21941f5c8b..74f101c573 100644 --- a/tensorflow/contrib/lite/tools/accuracy/BUILD +++ b/tensorflow/contrib/lite/tools/accuracy/BUILD @@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2.0 load("//tensorflow:tensorflow.bzl", "tf_cc_binary", "tf_cc_test") load("//tensorflow/contrib/lite:build_def.bzl", "tflite_copts", "tflite_linkopts") +load("//tensorflow/contrib/lite:special_rules.bzl", "tflite_portable_test_suite") common_linkopts = tflite_linkopts() + select({ "//conditions:default": [], @@ -44,6 +45,7 @@ tf_cc_test( data = ["//tensorflow/contrib/lite:testdata/multi_add.bin"], linkopts = common_linkopts, linkstatic = 1, + tags = ["tflite_not_portable_ios"], deps = [ ":utils", "@com_google_googletest//:gtest", @@ -102,6 +104,10 @@ tf_cc_test( data = ["//tensorflow/contrib/lite:testdata/multi_add.bin"], linkopts = common_linkopts, linkstatic = 1, + tags = [ + "tflite_not_portable_android", + "tflite_not_portable_ios", + ], deps = [ "//tensorflow/cc:cc_ops", "//tensorflow/cc:scope", @@ -152,6 +158,7 @@ tf_cc_test( srcs = ["file_reader_stage_test.cc"], linkopts = common_linkopts, linkstatic = 1, + tags = ["tflite_not_portable_ios"], deps = [ ":file_reader_stage", "@com_google_googletest//:gtest", @@ -226,6 +233,7 @@ tf_cc_test( srcs = ["eval_pipeline_test.cc"], linkopts = common_linkopts, linkstatic = 1, + tags = ["tflite_not_portable_ios"], deps = [ ":eval_pipeline", "//tensorflow/cc:cc_ops", @@ -277,6 +285,7 @@ tf_cc_test( srcs = ["eval_pipeline_builder_test.cc"], linkopts = common_linkopts, linkstatic = 1, + tags = ["tflite_not_portable_ios"], deps = [ ":eval_pipeline_builder", "//tensorflow/cc:cc_ops", @@ -312,3 +321,5 @@ cc_library( }, ), ) + +tflite_portable_test_suite() diff --git a/tensorflow/contrib/lite/tools/accuracy/ilsvrc/BUILD b/tensorflow/contrib/lite/tools/accuracy/ilsvrc/BUILD index 14eb55b036..a66812fe87 100644 --- a/tensorflow/contrib/lite/tools/accuracy/ilsvrc/BUILD +++ b/tensorflow/contrib/lite/tools/accuracy/ilsvrc/BUILD @@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2.0 load("//tensorflow:tensorflow.bzl", "tf_cc_binary", "tf_cc_test") load("//tensorflow/contrib/lite:build_def.bzl", "tflite_copts", "tflite_linkopts") +load("//tensorflow/contrib/lite:special_rules.bzl", "tflite_portable_test_suite") common_linkopts = tflite_linkopts() + select({ "//conditions:default": [], @@ -52,6 +53,10 @@ tf_cc_test( data = [":testdata/grace_hopper.jpg"], linkopts = common_linkopts, linkstatic = 1, + tags = [ + "tflite_not_portable_android", + "tflite_not_portable_ios", + ], deps = [ ":inception_preprocessing", "//tensorflow/contrib/lite/tools/accuracy:android_required_build_flags", @@ -96,6 +101,7 @@ tf_cc_test( srcs = ["imagenet_topk_eval_test.cc"], linkopts = common_linkopts, linkstatic = 1, + tags = ["tflite_not_portable_ios"], deps = [ ":imagenet_topk_eval", "@com_google_googletest//:gtest", @@ -171,3 +177,5 @@ tf_cc_binary( }, ), ) + +tflite_portable_test_suite() diff --git a/tensorflow/contrib/lite/tools/accuracy/ilsvrc/imagenet_model_evaluator.cc b/tensorflow/contrib/lite/tools/accuracy/ilsvrc/imagenet_model_evaluator.cc index e0e5dcb264..1731d2ade6 100644 --- a/tensorflow/contrib/lite/tools/accuracy/ilsvrc/imagenet_model_evaluator.cc +++ b/tensorflow/contrib/lite/tools/accuracy/ilsvrc/imagenet_model_evaluator.cc @@ -235,7 +235,7 @@ Status FilterBlackListedImages(const string& blacklist_file_path, blacklist_ids.reserve(lines.size()); // Populate blacklist_ids with indices of images. std::transform(lines.begin(), lines.end(), - std::back_insert_iterator(blacklist_ids), + std::back_inserter(blacklist_ids), [](const string& val) { return std::stoi(val) - 1; }); std::vector<ImageLabel> filtered_images; |