Relative Content

Tag Archive for pythonkerasconv-neural-networktensorkaggle

Good val_accuracy and accuracy but bad confusion matrix and classification_report

I have been developing a CNN with tensorflow, and I have obtained good results, accuracy .92, loss .3, val_accuracy .85 and val_loss .5, however, when looking at the confusion matrix I see that only 30% of the images are classified correctly, and when it comes to producing a classification_report it appears to me that it has a little more than 15% accuracy, this even using the validation data set and the training data set. Why could this happen? How could I solve it? I leave my complete code below: