title: Resizing images in Keras ImageDataGenerator flow methods
body: <p>The Keras <code>ImageDataGenerator</code> class provides the two flow methods <code>flow(X, y)</code> and <code>flow_from_directory(directory)</code> (<a href="https://keras.io/preprocessing/image/" rel="noreferrer">https://keras.io/preprocessing/image/</a>).</p>
  
  <p>Why is the parameter </p>
  
  <blockquote>
    <p>target_size: tuple of integers, default: (256, 256). The dimensions to which all images found will be resized</p>
  </blockquote>
  
  <p>Only provided by <em>flow_from_directory(directory)</em> ? And what is the most concise way to add reshaping of images to the preprocessing pipeline using <em>flow(X, y)</em> ?</p>