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.
- 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).
- Keep the external training labels as is. You don’t have to use np.vectorize lines. Remove those lines.
- Loss should be
categorical_crossentropy
and notbinary_crossentropy
- When using to_categorical, specify the number of classes to be N_tr
- Remove the 2 reshape lines above the to_categorical call.
- Add the comented training image data augmentation steps back in.
- Specify the
input_shape
parameter for the 1st layer in model. - 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.