diff options
author | Sami Kama <skama@nvidia.com> | 2018-05-30 13:43:55 -0700 |
---|---|---|
committer | Sami Kama <skama@nvidia.com> | 2018-05-30 13:43:55 -0700 |
commit | 898e646d0291d753e5092ff5e9c6ff70f5064c19 (patch) | |
tree | 2e8565371acf67b0ec2279c36ebb9a627c12ba5e /tensorflow/python/tools | |
parent | 73026bf564407c3f28607eb3e0c73e0b60eaf69c (diff) |
Import only ops not the implementations to prevent issues if user don't have tensorrt installed
Diffstat (limited to 'tensorflow/python/tools')
-rw-r--r--[-rwxr-xr-x] | tensorflow/python/tools/import_pb_to_tensorboard.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/python/tools/import_pb_to_tensorboard.py b/tensorflow/python/tools/import_pb_to_tensorboard.py index d1f9cd87b3..96f47c85da 100755..100644 --- a/tensorflow/python/tools/import_pb_to_tensorboard.py +++ b/tensorflow/python/tools/import_pb_to_tensorboard.py @@ -30,12 +30,12 @@ from tensorflow.python.platform import gfile from tensorflow.python.summary import summary # Try importing TensorRT ops if available -# pylint: disable=unused-import,trailing-whitespace +# pylint: disable=unused-import,trailing-whitespace,g-import-not-at-top,wildcard-import try: - import tensorflow.contrib.tensorrt as trt + from tensorflow.contrib.tensorrt.ops.gen_trt_engine_op import * except ImportError: pass -# pylint: enable=unused-import,trailing-whitespace +# pylint: enable=unused-import,trailing-whitespace,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. |