title: 'Image data of dtype object cannot be converted to float' on imshow()
body: <p>I'm trying to show images from my dataset. But on imshow() function I have this error.
  'Image data of dtype object cannot be converted to float'</p>
  <p>This is my code:</p>
  <pre><code>val_ds = tf.keras.utils.image_dataset_from_directory(
    '/media/Tesi/',
    validation_split=0.2,
    subset=&quot;validation&quot;,
    seed=123,
    image_size=(360, 360),
    batch_size=18)
  
  
  probability_model = tf.keras.Sequential([model, 
                                           tf.keras.layers.Softmax()])
  
  predictions = probability_model.predict(val_ds)
  predictions[0]
  
  plt.figure(figsize=(10,10))
  
  for i in range(25):
    plt.subplot(5,5,i+1)
    plt.xticks([])
    plt.yticks([])
    plt.grid(False)
    plt.imshow(val_ds, cmap=plt.cm.binary)
    plt.xlabel(class_names[predictions[i]])
  plt.show()
  </code></pre>
  <p>Can I solve it?
  Thank you,
  Best regards</p>