Skip to content

Instantly share code, notes, and snippets.

@richardgrantserverless
Created May 31, 2022 16:39
Show Gist options
  • Save richardgrantserverless/5ba5d4aed02475d4ee4dd87d0bc90b70 to your computer and use it in GitHub Desktop.
Save richardgrantserverless/5ba5d4aed02475d4ee4dd87d0bc90b70 to your computer and use it in GitHub Desktop.
def create_graph():
with tf.gfile.FastGFile(os.path.join('/tmp/imagenet/', 'classify_image_graph_def.pb'), 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
_ = tf.import_graph_def(graph_def, name='')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment