mirror of
https://github.com/mozilla/DeepSpeech.git
synced 2025-10-26 11:19:39 +00:00
Add tool to find out which ops are needed by a graph
This commit is contained in:
parent
400c9c0e5d
commit
d2be00fad0
11
bin/ops_in_graph.py
Executable file
11
bin/ops_in_graph.py
Executable file
@ -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))))
|
||||
Loading…
Reference in New Issue
Block a user