Created
November 27, 2019 21:13
-
-
Save gaphex/cf3e1e544cf06da1b766f7b7fc8ec392 to your computer and use it in GitHub Desktop.
This file contains 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 load_graph(frozen_graph_filename): | |
with tf.gfile.GFile(frozen_graph_filename, "rb") as f: | |
graph_def = tf.GraphDef() | |
graph_def.ParseFromString(f.read()) | |
with tf.Graph().as_default() as graph: | |
tf.import_graph_def(graph_def) | |
return graph | |
restored_graph = load_graph("frozen_graph.pb") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment