title: For test_datagen.flow from directory, what should I specify the class_mode?
body: <p>I'm attempting to create a CNN model using image data. My entire data set was divided into train, test, and validation. I used <code>class_mode = 'categorical'</code> for the training data since training data needs labels, and <code>class_mode = None</code> for the test data because testing shouldn't be done with labels.
  the snippet of code</p>
  <pre><code>train_datagen =  ImageDataGenerator(
          rescale=1 / 255.0,
          rotation_range=20,
          zoom_range=0.05,
          width_shift_range=0.05,
          height_shift_range=0.05,
          shear_range=0.05,
          horizontal_flip=True,
          vertical_flip=True,
          fill_mode=&quot;nearest&quot;
      )
  
  test_datagen = ImageDataGenerator(
        rescale=1/255,
  )
  
  train_generator = train_datagen.flow_from_directory(
      directory=train_dir,
      target_size=(height, width),
      batch_size=batch_size,
      class_mode='categorical',
      shuffle=True,
      seed=42
  )
  
  valid_generator = train_datagen.flow_from_directory(
      directory=val_dir,
      target_size=(height, width),
      batch_size=batch_size,
      class_mode='categorical',
      shuffle=True,
      seed=42
  )
  
  
  test_generator = test_datagen.flow_from_directory(
      &quot;/content/drive/MyDrive/MonkeyPox/output/test&quot;,
      target_size=(height, width),
      batch_size=1,
      class_mode=None,   **here**
      shuffle=False,
      seed=42
  )
  </code></pre>
  <p>when I specify <code>class_moede=None</code> in the <code>test_generator</code>,</p>
  <pre><code>model.evaluate(test_generator, batch_size=16)
  </code></pre>
  <p>the loss &amp; accuracy is [0.0, 0.0], which means my model is failed to evaluate</p>
  <p>again  when I specify <code>class_moede='categorical' in the </code>test_generator`` ,</p>
  <pre><code>model.evaluate(test_generator, batch_size=16)
  </code></pre>
  <p>it gives a certain loss and accuracy</p>
  <p>My question is why i am getting [0.0, 0.0] when i am using <code>class_moede=None</code> in the <code>test_generator</code> ?</p>