Skip to content

Instantly share code, notes, and snippets.

@venuktan
Created February 12, 2019 21:06
Show Gist options
  • Save venuktan/5f66ba5bb37bb7531507ca1a182cf1af to your computer and use it in GitHub Desktop.
Save venuktan/5f66ba5bb37bb7531507ca1a182cf1af to your computer and use it in GitHub Desktop.
tf load graph from bytes
def load_ascii_bytes(model):
graph_def = tf.GraphDef()
graph_def.ParseFromString(model)
with tf.Graph().as_default() as graph:
tf.import_graph_def(
graph_def,
input_map=None,
return_elements=None,
name="",
op_dict=None,
producer_op_list=None
)
return graph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment