aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/tools/print_selective_registration_header.py
diff options
context:
space:
mode:
authorGravatar Justine Tunney <jart@google.com>2016-12-29 22:46:24 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-12-29 23:06:59 -0800
commite121667dc609de978a223c56ee906368d2c4ceef (patch)
tree7d4e1f1e1b4fd469487872c0cd34ddace5ac570c /tensorflow/python/tools/print_selective_registration_header.py
parent7815fcba7767aa1eb3196c5861e174f8b3c43bab (diff)
Remove so many more hourglass imports
Change: 143230429
Diffstat (limited to 'tensorflow/python/tools/print_selective_registration_header.py')
-rw-r--r--tensorflow/python/tools/print_selective_registration_header.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/tensorflow/python/tools/print_selective_registration_header.py b/tensorflow/python/tools/print_selective_registration_header.py
index 963c732a4a..79c5eaa16e 100644
--- a/tensorflow/python/tools/print_selective_registration_header.py
+++ b/tensorflow/python/tools/print_selective_registration_header.py
@@ -29,21 +29,25 @@ from __future__ import print_function
import sys
-import tensorflow as tf
from google.protobuf import text_format
+
from tensorflow.core.framework import graph_pb2
from tensorflow.python import pywrap_tensorflow
+from tensorflow.python.platform import app
+from tensorflow.python.platform import flags
+from tensorflow.python.platform import gfile
+from tensorflow.python.platform import tf_logging
-FLAGS = tf.app.flags.FLAGS
+FLAGS = flags.FLAGS
-tf.app.flags.DEFINE_string('proto_fileformat', 'rawproto',
- 'Format of proto file, either textproto or rawproto')
+flags.DEFINE_string('proto_fileformat', 'rawproto',
+ 'Format of proto file, either textproto or rawproto')
-tf.app.flags.DEFINE_string(
+flags.DEFINE_string(
'graphs', '',
'Comma-separated list of paths to model files to be analyzed.')
-tf.app.flags.DEFINE_string(
+flags.DEFINE_string(
'default_ops', 'NoOp:NoOp,_Recv:RecvOp,_Send:SendOp',
'Default operator:kernel pairs to always include implementation for. '
'Pass "all" to have all operators and kernels included; note that this '
@@ -57,9 +61,9 @@ def get_ops_and_kernels(proto_fileformat, proto_files, default_ops_str):
ops = set()
for proto_file in proto_files:
- tf.logging.info('Loading proto file %s', proto_file)
+ tf_logging.info('Loading proto file %s', proto_file)
# Load GraphDef.
- file_data = tf.gfile.GFile(proto_file).read()
+ file_data = gfile.GFile(proto_file).read()
if proto_fileformat == 'rawproto':
graph_def = graph_pb2.GraphDef.FromString(file_data)
else:
@@ -156,4 +160,4 @@ def main(unused_argv):
if __name__ == '__main__':
- tf.app.run()
+ app.run()