title: Testing images on a tensorflow model
body: <p>I'm Trying to test a tensorflow model with 10 images as batch size and as output get a segmentation of an specific region. Here is the code I'm using to load the model</p>
  
  <pre><code>def run(model_path, image_path,graph_path ,output_path):
  with tf.Session() as sess:
    model_saver = tf.train.import_meta_graph(graph_path, clear_devices=True)
    model_saver.restore(sess,tf.train.latest_checkpoint(LOGDIR))
    sess.run(tf.global_variables_initializer())
    graph = tf.get_default_graph()
    x=tf.placeholder(tf.float32,shape=[10, 400, 600, 3])
    output = graph.get_tensor_by_name("prediction:0")
    print("Model restored.")
    print('Initialized')
    temp=[]
    import glob
    from scipy import misc
    for file in os.listdir(image_path):
      if file.endswith(".jpg"):
        img = misc.imread(image_path + file)
        img = img.astype('Float32')
        img = np.resize(img,(400,600,3))
        temp.append(img)
    prediction = sess.run(output, feed_dict={x:temp})
    cv2.imwrite(output_path, prediction * 255)
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <pre><code>InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'x' with dtype float and shape [10,400,600,3]
       [[Node: x = Placeholder[dtype=DT_FLOAT, shape=[10,400,600,3], _device="/job:localhost/replica:0/task:0/gpu:0"]()]]
       [[Node: prediction/_265 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_28_prediction", tensor_type=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
  </code></pre>
  
  <p>Does anybody knows were the bug is or if there is another way of testing a model.</p>