title: Extract data from tensorflow dataset (e.g. to numpy)
body: <p>I'm loading images via</p>
  <pre><code>data = keras.preprocessing.image_dataset_from_directory(
    './data', 
    labels='inferred', 
    label_mode='binary', 
    validation_split=0.2, 
    subset=&quot;training&quot;, 
    image_size=(img_height, img_width), 
    batch_size=sz_batch, 
    crop_to_aspect_ratio=True
  )
  </code></pre>
  <p>I want to use the obtained data in non-tensorflow routines too. Therefore, I want to extract the data e.g. to numpy arrays. How can I achieve this? I can't use <code>tfds</code></p>