I am using the InceptionV3 model for training. Here is the link for the code (https://github.com/maxmelnick/tensorflow/blob/no_random/tensorflow/examples/image_retraining/retrain.py) Initially I have a small size dataset. So, I used the augmentation technique to increase the size of the dataset.

While training phase dataset was divided into training, validation, and testing. During the training phase, it shows 96% accuracy for 11 classes. But When I predict any new input image(Unseen data) it gave 56% accuracy. What's the problem lies with the model?

I have already used Dropout, Cross-validation, OverSampling techniques but not achieved good results over the new input image.

Parameters used while training.

Training Samples - 800 images in each class

  • Training Samples - 70%
  • Validation Samples - 20%
  • Testing Samples - 10%

Testing Samples (Unseen data other than Training Samples) - 51 images in each class

Epochs - 10,000

  • $\begingroup$ You might consider stratified cross-validation. If you don't have all 11 classes in the training data and testing data at relatively equal rate then there are a number of problems to be had. You could miss training the network on an entire class upon which it will be tested. You could fail to test on a class that had been trained. Too much dominance of one class in the data makes dominance in the trained performance also known as bias in the model. Finally you have to make sure the new stuff is of the same essence, the same "physics", as the training data. $\endgroup$ Sep 1, 2020 at 10:54
  • $\begingroup$ Thank you EngrStudent. $\endgroup$
    – Rina
    Sep 4, 2020 at 5:00
  • $\begingroup$ You can expand and robustize your training using the images by using a transformative generator. If you flip it on the x, y, or both axes is it the same object? What about if you translate it or scale it some? What if you add some noises or perturb the histograms? These sorts of "dials" in the generator can give you 10x more images and make your network much more robust. You still need to split off a stratified test set to get an idea of real-world performance. Then use 5x CV in your training. What is your measure of goodness/loss? categorical cross-entropy/cross-information? $\endgroup$ Sep 4, 2020 at 11:56
  • 1
    $\begingroup$ categorical cross-entropy $\endgroup$
    – Rina
    Sep 8, 2020 at 4:03

1 Answer 1


It sounds like you’re overfitting the training data, and so you should research some approaches to regularisation of neural networks. I see you’ve used dropout, which is one of these, but may not be sufficient.

You could also consider dividing your training data into a training set and a validation set and halting training when performance on the validation set stops improving. This is called early stopping


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.