Validation accuracy stuck at 20%

I’m working on an image classification project using this dataset. However, my validation accuracy is constantly stuck at exactly 20%.

I’ve tried changing epochs, optimizers, adding/decreasing layer complexity, batch_size, etc. I have a function that changes learning rate as the epochs change and I’m using data augmentation. I’m not sure what to do because my val_accuracy is not changing at all from 0.2. Any advice is greatly appreciated!

Please click my name and message your notebook as an attachment.

Please go through the lectures and previous labs in the course so far. Here are some issues:

  1. For a multiclass classification, sigmoid isn’t the correct activation to use for the output layer.
  2. ImageDataGenerator encodes labels as integers and doesn’t one-hot encode them. The way you’ve done it is incorrect. Do fix the loss function to reflect the labels.
  3. Your learning rate schedule picks a very low rate for the optimizer beyond 10 iterations. I recommend removing the callback and let the optimizer learn with the default configuration.
  4. Leave the batch size at 32 since you have a lot of images.
1 Like

Hello. Thank you for your help! I was able to correct these issues and my accuracy jumped to around 40%. Since this is still pretty low, I was wondering if you had any thoughts on what the foundational issues are with my program. I used a pre-existing cleaned dataset and I’ve tried a number of different epochs, optimizers, and loss functions to see if they make a difference. I’ve looked through the past lectures, and I’m still having trouble identifying what the core issue is. Do you have any thoughts on this?

Thank you so much for your help!

Posting notebooks in public is likely to get your account suspended / removed. Don’t forget to remove code from your post.

Please read this.
If you’re stuck after reading the provided topic, please click my name and message your notebook as an attachment.