Created
October 17, 2018 19:28
-
-
Save lukmanr/03660888ba602b5d79f7adf8884833c1 to your computer and use it in GitHub Desktop.
TF Model Optimization 9
This file contains hidden or 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
def get_graph_def_from_saved_model(saved_model_dir): | |
with tf.Session() as session: | |
meta_graph_def = tf.saved_model.loader.load( | |
session, | |
tags=[tag_constants.SERVING], | |
export_dir=saved_model_dir | |
) | |
return meta_graph_def.graph_def |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment