Skip to content

Instantly share code, notes, and snippets.

@hadifar
Created December 2, 2018 16:36
Show Gist options
  • Save hadifar/5c983c992a45e87ead7930949ffb28e9 to your computer and use it in GitHub Desktop.
Save hadifar/5c983c992a45e87ead7930949ffb28e9 to your computer and use it in GitHub Desktop.
import tensorflow as tf
session = tf.Session()
for item in tf.get_default_graph().get_operations():
print(item)
print(50*'-')
model = tf.saved_model.loader.load(sess=session,
tags=[tf.saved_model.tag_constants.SERVING],
export_dir='./test/')
print(50*'-')
for item in tf.get_default_graph().get_operations():
print(item)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment