I am getting only 82% accuracy so plz suggest me the ways to improve code and plz tell me how to improve model layers here is my code:- https://github.com/agarwalyash02/machine-learning/blob/master/pokedex_training_model_from_scratch.ipynb
Getting low accuracy on the pokedex challenge
hey @Jan19LPN0013 ,
Accuracy in deep learning depends upon various factors like ,
what layers did you used , in what manner , with how many number of nodes , activation function , learning rate and many more things .
To give some suggestions for the above notebook :
- You can more augmentation techniques , to create more subsets of dataset.
- If classes are imbalanced , then you can assign custom class weights to your model for better performance.
- Instead of using directly the flatten layer you can use GlobalMaxPooling layer.
- Try using transfer learing , as those models are pre trained on really good and big dataset , hence they are more generalized and perform really good then our custom models.
But you need to pay attention on your feed forward network while using transfer learning , as how you preprocess the information generated by these pre trained models is the actual task to perform. - Try using Custom Callbacks , for scheduling learning rate. It really helps very much in making the model training a lot.
- When working on classification technique , always check the classification report , to see how the model perform with respect to each and individual class in dataset.
Different models can have different performance measures , so if you have 3 or 4 different models performing differently on different classes , then you can ensemble there results, so that the final results are more generalized to the respective output classes.
I hope this would have helped you
Thank You and Happy creating Deep Learning Models .
I have added GlobalMaxPooling layer previously but it decreases the accuracy
and how to perform point 6 plz explain
and can you tell me what changes I have to make in layers as I don’t which will come and when in layers I have added
OKAY
search about classification report sklearn.
you just need to provide true labels , and your predicted labels to check how is your model performing.
As accuracy is not just a single metric to check classification results.
adjustments to these layers are a bit to understand first.
what does a layer do ? Whether it is useful or not ? which activation layer to use ?
these are some questions you need to search first and understand.
if still there is some confusion in them , you can ask it. After this only i will be able to reply you.
I am only asking check my layers of cnn model and give suggestion how to accurately use the layers or I have used layers properly or not
hey @Jan19LPN0013 ,
there is not perfect rule of how to use the layer correctly, you just need to practice and check which performs much better.
but a bit suggestion.
- after flatten layer , you have reduced the number of nodes very heavily , from 18432 to directly 64.
Try with 18432 to 1024 to 128 to 10 and try with leakyrelu activation between these layers. - You can try taking higher kernel size in initial convolutional layers and then reducing it further.
- User Learning Rate scheduler , it will in much proper training.
- You can use more augmentations.
I hope these will help.
ohk i will implement this change get back to you thankyou
yeah sure. No problem.