I saw that you’ve posted several different versions of this question today.
I’m not a mentor for that course, but I will observe that your accuracy is just about what you’d expect if you were making random predictions among 24 labels - or if you were always making the same prediction (i.e always predict 0 from a range of 0 to 23, regardless of the data). 1/24 is just about exactly 0.041.
In my experience, this sort of issue is a huge clue.
Also observe that in “loss: nan”, that means Not a Number. So the loss values are not valid. Loss should always be a positive real value.
Putting these together, I’d guess that your training method is not working.
Hi @TMosh thank you for your feedback. I suspected that my training method is not working, but I don’t know why it isn’t working or what I can do to fix it, which is why I am reaching out to ask for help. Do you have any ideas what might be going wrong? All of the “Expected output” fields are correct and I have followed the examples from the teachings this week, so I’m not sure where to go from here.
The post that you referenced was someone trying to further optimize their model from 86%, and I have reviewed the responses for this post. My model is leveling out at 4% so I think there’s something much different that is wrong with the model. I have been reviewing these posts but nothing is standing out to me as a reason why the accuracy would be so low. Would you be willing to take a look at my notebook?
When I did this notebook assignment, what I remember I was following the course weeks’ video, and included every image augmentation parameter but one need to understand, the train model requires it do be as simple as possible. the emphasis on batch_size, dense layer and optimiser also is important.
you need to append your file in row and not in line.
Your reshape code for labels and images is incorrect.
As explained in the previous comment, your Image augmentation for train_datagen need to be as simple as possible. I know we get confused here and include everything what course instructor mentions in the weeks video, but the lesser things you add, the better accuracy.
Your last layers dense need to be 26, as the number of categories is 26 alphabets. Your dense layer model compile needed changes.
You do not need dropout layer always.
Use Adam optimiser as it gives better performance with little hyperparameter tuning.
Please check the notebook thoroughly, let me know once you have cleared the model training with achieved accuracy.