Created
June 6, 2019 19:04
-
-
Save iamsurya/3f580aa72fbddb1f54a744e4430fbd6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tensorflow.python.platform import gfile | |
with tf.Session() as sess: | |
with gfile.FastGFile('slopemodel/slopemodel.pb', 'rb') as f: | |
graph_def = tf.GraphDef() | |
graph_def.ParseFromString(f.read()) | |
sess.graph.as_default() | |
g_in = tf.import_graph_def(graph_def) | |
for op in tf.get_default_graph().get_operations(): | |
print(str(op.name)) | |
for n in tf.get_default_graph().as_graph_def().node: | |
print(n.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment