简体   繁体   中英

Keras CNN training accuracy is good but test accuracy is very low

Please give me any comment for these CNN results. I have used 2000 training images and 400 test images. Training accuracy is perfect but test accuracy is very low. I think it because there is much variation between training and test images. Anyone have a good idea for this case?

[ 精度图 ]

This is clear case of over-fitting. How many learneable parameters you have? For example VGGnet has 138M parameters and in this case its not very hard to see some neuron in the network must have sort of memorized a training image as it is and thus your network is not generalizing well.

To fix that, first of all you can try a simpler model if task is simple like discriminating between shapes . Also you can increase training data via transformations like swapping color channels (if it doesnt impact the output class), flipping or rotating image to make your net generalize better. Include L1/L2 regularization in your loss function and try dropouts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM