Skip to content

Commit 2021be9

Browse files
committedMay 25, 2020
Dump Tensorflow graphs in binary.
1 parent bfa1a60 commit 2021be9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎Athos/TFCompiler/DumpTFMtData.py

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ def save_graph_metadata(output_tensor, sess, feed_dict):
5252
optimized_graph_def = TransformGraph(graph_def, [], [output_tensor.name], transforms)
5353
with open('./graphDef.mtdata', 'w') as f:
5454
f.write(str(optimized_graph_def))
55+
with open('./graphDef.bin', 'w') as f:
56+
f.write(optimized_graph_def.SerializeToString())
5557

5658
# Save size information for tensors on which output depends
5759
tensors_to_evaluate = []

0 commit comments

Comments
 (0)