In my code of Pokedex, my validation accuracy is not increasing , ie increasing but at a very low pace, that’ obviously because i have set the learning rate to be very low, but that’s because if increase the value of the learning rate the validation accuracy goes maximum upto 34-35 % and then start decreasing, plz if you can check my code, and suggest some changes , to get good validation accuracy?
code link :- https://colab.research.google.com/drive/1O6O9EFKuTJnYYyYAAanbRgQEULf4JLxl?usp=sharing
Val_accuracy not increasing?
hey @saksham_thukral ,
before i move into suggesting you about the code.
can you please tell me why did you used MobileNetV2 model for this project? and did you had a look at your dataset before working on this project?
Because the problem set of the challenge, suggested 2 models for the challenge, one was alexnet and the other was mobilenet. Since mobilenetv2 was using even less memory and less number of parameters , and for making a mobile friendly model i found these aspects of mobilenetV2 better , so i chose it. Is there any other aspect also that we have to consider before choosing a model?
Yeah there are many aspects to choose a model and there is no problem in your approach.
But one thing about MobileNet is that it requires large amount of data, with not much variation in images to provide us with a great accuracy.
Your data images are highly variate for example in class Aerodactyl , if you look at this class images , you will see a bunch of images with black background , some have white background, some are pokemon play cards , in some images pokemon is showing its fatty and a lot other variations. This is happening in all other classes too.
I know you might be thinking that this why we use deep learning to solve this task and yes deep learning models can do , but With MobileNet I dont think that you will be able receive that accuracy which is needed.
And this is the reason that your models val_accuracy is not increasing , the model easily gets overfitted on this data and hence is not able to classify at validation correctly and hence , it works so.
Lowering or increasing learning rate is just for training purpose not for validation purpose. It just in how much time your models should learn things without getting overfitted.
You can try some stuff to make this model work :
- change your model to VGG , Resnet , DenseNet ,Inception ,etc. search keras.applications for them.
- Use Data Augmentation
- Apply some data processing techniques like crop , scale values, denoise ,etc.
I hope this will help you increase your accuracy and val_accuracy both and make your perform better.
Thank You.