Following the advise of using 2 epochs, image augmentation, no more than 2 Conv2D and 2 MaxPooling2D, expanding dimensions I can’t reach minimum accepted validation accuracy.
I have played around with learning rate [0.0001, 0.01, 0.007, 0.05, 0.1 etc.]
with # of filters in the Conv2 layer [64, 128, 512, 1024]
and adding and removing augmentation types [rotation_range=40, width_shift_range=0.2,
height_shift_range=0.2, shear_range=0.2, zoom_range=0.2, horizontal_flip=True,fill_mode=‘nearest’]
Could you please advise what kind of parameter tuning I could try?
I noticed it just now, can you double check the units of your second and last Dense layer. Remember that the number should be the same of the number of different letters in the alphabet.
I just wanted to share that I was having the same problem with chronic low accuracy around .05. The fix, in my case, was cleaning up the “missing category 9” problem in the labels data set. I’m not sure what the most pythonic way would have been, but I simply made a loop that added 1 to category labels 0-8, leaving 10-24 alone, and then I was left with a clean list of categories between 1 and 24. And voila, I instantly went from .05 accuracy to over .9. It didn’t occur to me how important that would be, or at least it wasn’t obvious to me that it was a step needed in the get_data function. Hope that’s helpful for someone else out there!
I didn’t realise that this was something we were supposed to correct for. In my code I had to lower all values greater than 8 by 1 so my values ranged from 0 to 23. When I did this the final result went from 0.05 to about 0.7.
Is this supposed to be automatically fixed by our code earlier on, or was the need for this fix mentioned somewhere else?
Just to note that the MNIST sign language dataset actually doesn’t contain any examples of class 9 (letter J) or class 25 (letter Z), because these involve motion. I used n_classes = 26 when training my model, to allow for label values from 0 to 25 i.e. covering all the letters. But the training data will only contain 23 possible letters. If I don’t do this, and use 23 as the number of classes, I see nan for my loss when using sparse_categorical_crossentropy.