Created
June 29, 2018 01:44
-
-
Save Hiromi-nee/00aa5ec6980417f77bc6bdaf273ff95a to your computer and use it in GitHub Desktop.
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
# This assumes your model is ready to be called with .predict() | |
sess = keras.get_session() | |
graph = sess.graph | |
graph_dev = graph.as_graph_def() | |
frozen_graph = tf.graph_util.convert_variables_to_constants( | |
sess, graph_def, nodes_to_output) | |
encoded_frozen_graph = frozen_graph.SerializeToString() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment