aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tensorflow/contrib/lite/python/BUILD2
-rw-r--r--tensorflow/contrib/lite/python/lite_test.py14
2 files changed, 5 insertions, 11 deletions
diff --git a/tensorflow/contrib/lite/python/BUILD b/tensorflow/contrib/lite/python/BUILD
index be6c44d306..916788f215 100644
--- a/tensorflow/contrib/lite/python/BUILD
+++ b/tensorflow/contrib/lite/python/BUILD
@@ -73,6 +73,7 @@ py_test(
data = ["@tflite_mobilenet_ssd_quant_protobuf//:tflite_graph.pb"],
srcs_version = "PY2AND3",
tags = [
+ "no_oss",
"no_windows",
],
deps = [
@@ -171,6 +172,7 @@ py_test(
srcs = ["convert_saved_model_test.py"],
srcs_version = "PY2AND3",
tags = [
+ "no_oss",
"no_windows",
],
visibility = ["//visibility:public"],
diff --git a/tensorflow/contrib/lite/python/lite_test.py b/tensorflow/contrib/lite/python/lite_test.py
index ef9bbded2a..d243a494f6 100644
--- a/tensorflow/contrib/lite/python/lite_test.py
+++ b/tensorflow/contrib/lite/python/lite_test.py
@@ -591,19 +591,11 @@ class FromFrozenGraphFile(test_util.TensorFlowTestCase):
'Unable to parse input file \'{}\'.'.format(graph_def_file),
str(error.exception))
+ # TODO(nupurgarg): Test model loading in open source.
def _initObjectDetectionArgs(self):
# Initializes the arguments required for the object detection model.
- # Looks for the model file which is saved in a different location interally
- # and externally.
- filename = resource_loader.get_path_to_datafile('testdata/tflite_graph.pb')
- if not os.path.exists(filename):
- filename = os.path.join(
- resource_loader.get_root_dir_with_all_resources(),
- '../tflite_mobilenet_ssd_quant_protobuf/tflite_graph.pb')
- if not os.path.exists(filename):
- raise IOError("File '{0}' does not exist.".format(filename))
-
- self._graph_def_file = filename
+ self._graph_def_file = resource_loader.get_path_to_datafile(
+ 'testdata/tflite_graph.pb')
self._input_arrays = ['normalized_input_image_tensor']
self._output_arrays = [
'TFLite_Detection_PostProcess', 'TFLite_Detection_PostProcess:1',