Skip to content

Instantly share code, notes, and snippets.

@FrancescoSaverioZuppichini
Last active July 4, 2018 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FrancescoSaverioZuppichini/70b7c85931867f9d3953cb5c1e391fcc to your computer and use it in GitHub Desktop.
Save FrancescoSaverioZuppichini/70b7c85931867f9d3953cb5c1e391fcc to your computer and use it in GitHub Desktop.
with tf.Session() as sess:
saver = tf.train.import_meta_graph("{}.meta".format('/tmp/model.ckpt'))
saver.restore(sess, '/tmp/model.ckpt')
graph = tf.get_default_graph()
x, y = graph.get_tensor_by_name('iter_next:0'), graph.get_tensor_by_name('iter_next:1')
print(sess.run(mnist_model.accuracy, feed_dict={x: test[0][0:64], y: test[1][0:64]}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment