diff --git a/bin/ops_in_graph.py b/bin/ops_in_graph.py new file mode 100755 index 00000000..ee0f2ff5 --- /dev/null +++ b/bin/ops_in_graph.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import tensorflow as tf +import sys + +with tf.gfile.FastGFile(sys.argv[1], 'rb') as fin: + graph_def = tf.GraphDef() + graph_def.MergeFromString(fin.read()) + + print('\n'.join(sorted(set(n.op for n in graph_def.node))))