I am looking for an example how to use a saved checkpoint of your example for simple inference of a given image, i.e. perform classification on a single image. Unfortunately, searching the internet has not been successful so far.
What I haven been doing so far is the following:
with tf.Session() as sess:
saver = tf.train.import_meta_graph(metafile)
saver.restore(sess, path_to_ckpt)
graph = tf.get_default_graph()
output = graph.get_tensor_by_name('model/pred:0')
pred = sess.run([output], feed_dict={x: image})
Unfortunately, I am not sure what x is supposed to be. Could you please provide an example for a simple prediction of a single image? Especially, I would need to know which layers to give what name in the model_fn so that I can reference them in the code above.
Hi,
I am looking for an example how to use a saved checkpoint of your example for simple inference of a given image, i.e. perform classification on a single image. Unfortunately, searching the internet has not been successful so far.
What I haven been doing so far is the following:
Unfortunately, I am not sure what
x
is supposed to be. Could you please provide an example for a simple prediction of a single image? Especially, I would need to know which layers to give what name in the model_fn so that I can reference them in the code above.Best regards.