aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/tools
diff options
context:
space:
mode:
authorGravatar gracehoney <31743510+aaroey@users.noreply.github.com>2018-08-03 14:28:42 -0700
committerGravatar gracehoney <31743510+aaroey@users.noreply.github.com>2018-08-03 14:28:42 -0700
commit16007c5820b7cd3fd6406871860d16d05e7ca97f (patch)
treef5d9f3ec5f5136f551146bdc85e04021e6b7057f /tensorflow/python/tools
parent5fc6ebb1db3b7714f5449737438ac5007abbb410 (diff)
Add missing dependency to the build rule.
Diffstat (limited to 'tensorflow/python/tools')
-rw-r--r--tensorflow/python/tools/BUILD1
-rw-r--r--tensorflow/python/tools/import_pb_to_tensorboard.py7
2 files changed, 6 insertions, 2 deletions
diff --git a/tensorflow/python/tools/BUILD b/tensorflow/python/tools/BUILD
index 6c34b6aaf3..13e59d75d0 100644
--- a/tensorflow/python/tools/BUILD
+++ b/tensorflow/python/tools/BUILD
@@ -63,6 +63,7 @@ py_binary(
srcs = ["import_pb_to_tensorboard.py"],
srcs_version = "PY2AND3",
deps = [
+ "//tensorflow/contrib/tensorrt:init_py",
"//tensorflow/core:protos_all_py",
"//tensorflow/python:client",
"//tensorflow/python:framework",
diff --git a/tensorflow/python/tools/import_pb_to_tensorboard.py b/tensorflow/python/tools/import_pb_to_tensorboard.py
index 96f47c85da..7b7c0fa4f3 100644
--- a/tensorflow/python/tools/import_pb_to_tensorboard.py
+++ b/tensorflow/python/tools/import_pb_to_tensorboard.py
@@ -30,12 +30,15 @@ from tensorflow.python.platform import gfile
from tensorflow.python.summary import summary
# Try importing TensorRT ops if available
-# pylint: disable=unused-import,trailing-whitespace,g-import-not-at-top,wildcard-import
+# TODO(aaroey): ideally we should import everything from tensorflow.contrib but
+# currently tensorrt module would cause build errors when being imported in
+# tensorflow/contrib/__init__.py. Fix it.
+# pylint: disable=unused-import,g-import-not-at-top,wildcard-import
try:
from tensorflow.contrib.tensorrt.ops.gen_trt_engine_op import *
except ImportError:
pass
-# pylint: enable=unused-import,trailing-whitespace,g-import-not-at-top,wildcard-import
+# pylint: enable=unused-import,g-import-not-at-top,wildcard-import
def import_to_tensorboard(model_dir, log_dir):
"""View an imported protobuf model (`.pb` file) as a graph in Tensorboard.