title: Resizing images for training in TensorFlow
body: <p>I tried to read my own images for training in TensorFlow. However, there seems to be an error: </p>
  
  <pre><code>ValueError: 'size' must be a 1-D Tensor of 2 elements: new_height, new_width. 
  </code></pre>
  
  <p>What is wrong with the following code sample?</p>
  
  <pre><code>filenames=['images/000001.jpg','images/000002.jpg','images/000003.jpg','images/000004.jpg']
  labels=[1,0,1,0]
  
  filename_queue=tf.train.string_input_producer(filenames)
  
  reader=tf.WholeFileReader()
  filename, content = reader.read(filename_queue)
  images=tf.image.decode_jpeg(content, channels=3)
  images=tf.cast(images, tf.float32)
  resized_images=tf.image.resize_images(images, 224, 224)
  
  image_batch, label_batch=tf.train.batch([resized_images, labels], batch_size=2)
  </code></pre>