Skip to content

Commit

Permalink
Dump Tensorflow graphs in binary.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed May 25, 2020
1 parent bfa1a60 commit 2021be9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Athos/TFCompiler/DumpTFMtData.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def save_graph_metadata(output_tensor, sess, feed_dict):
optimized_graph_def = TransformGraph(graph_def, [], [output_tensor.name], transforms)
with open('./graphDef.mtdata', 'w') as f:
f.write(str(optimized_graph_def))
with open('./graphDef.bin', 'w') as f:
f.write(optimized_graph_def.SerializeToString())

# Save size information for tensors on which output depends
tensors_to_evaluate = []
Expand Down

0 comments on commit 2021be9

Please sign in to comment.