title: The tf.train.batch shape mismatch with self defined np.array data
body: <p>I am using the slim library to train my own resnet_v2_152 and</p>
  
  <p>constructing my own image numpy array data which is stacked with 20 images.</p>
  
  <p>It means that my numpy array size will be </p>
  
  <pre><code>[224, 224, 20]
  </code></pre>
  
  <p>I have not problem when converting the data into tfrecords by using bytes conversion and get the image array data after preprocessed but it always shows the error of</p>
  
  <pre><code>INFO:tensorflow:Error reported to Coordinator: 
  &lt;class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'&gt;, 
  Shape mismatch in tuple component 0. Expected [224,224,3], got [224,224,20] 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>OutOfRangeError (see above for traceback): FIFOQueue '_5_batch/fifo_queue' 
  is closed and has insufficient elements (requested 1, current size 0)
  </code></pre>
  
  <p>when I apply the tf.train.batch</p>
  
  <p>Below is the part of my code, </p>
  
  <pre><code>    dataset = dataset_factory.get_dataset(
          FLAGS.datasetname, FLAGS.dataset, FLAGS.dataset_dir)
  
      network_fn = nets_factory.get_network_fn(
          FLAGS.model_name,
          num_classes=101,
          is_training=True)
  
      provider = slim.dataset_data_provider.DatasetDataProvider(
            dataset,
            num_readers=4,
            common_queue_capacity=20 * FLAGS.batch_size,
            common_queue_min=10 * FLAGS.batch_size)
      [image, label] = provider.get(['image', 'label'])
      label -= 0
  
      preprocessing_name = FLAGS.preprocessing_name or FLAGS.model_name
      image_preprocessing_fn = preprocessing_factory.get_preprocessing(preprocessing_name, is_training=True)
  
      eval_image_size = FLAGS.eval_image_size or network_fn.default_image_size
      image = image_preprocessing_fn(image, eval_image_size, eval_image_size)
  
      #Batch size is 1
      images, labels = tf.train.batch(
            [image, label],
            batch_size=FLAGS.batch_size,
            num_threads=4,
            capacity=5 * FLAGS.batch_size)   
  
      init_op = tf.group(tf.global_variables_initializer(),
              tf.local_variables_initializer())
  
      #This part to see the fetched results
      with tf.Session() as sess:
          coord = tf.train.Coordinator()
          threads = tf.train.start_queue_runners(coord=coord)
          sess.run(init_op)
          im = sess.run(images)
          l = sess.run(label)
          coord.request_stop()
          coord.join(threads)
  </code></pre>
  
  <p>I'm insisting to follow the style in train_image_classifier.py is because I would like to use the default training pattern provided by the slim library.</p>
  
  <p>I will really appreciate your help and answers. Thanks</p>