C2W4 Multi-class classifier - low accuracy 0.048

Hi, below is my model setting and the val_accuracy is as low as 0.04.
Appreciate if you could advise which process has been wrong. Thank you.
With best regards, jw1

Couple of things.

  1. You’re rescaling twice. Once when reading from csv and as part of ImageDataGenerator. Do it only once (say, image datagen to keep all transformations in one place).
  2. Keep the external training labels as is. You don’t have to use np.vectorize lines. Remove those lines.
  3. Loss should be categorical_crossentropy and not binary_crossentropy
  4. When using to_categorical, specify the number of classes to be N_tr
  5. Remove the 2 reshape lines above the to_categorical call.
  6. Add the comented training image data augmentation steps back in.
  7. Specify the input_shape parameter for the 1st layer in model.
  8. Start with Adam with default parameters and then adjust your learning rate if required. Your rate is low.

Hope this helps.

1 Like

Thank you very much mentor. I’ll surely take a look in this. Have a good day!

You’re welcome. Please remove your notebook from the question.