How to find wrong prediction cases in test set (CNNs using Keras)

寵の児 提交于 2019-12-03 17:17:58

问题


I'm using MNIST example with 60000 training image and 10000 testing image. How do I find which of the 10000 testing image that has an incorrect classification/prediction?


回答1:


Simply use model.predict_classes() and compare the output with true labes. i.e:

incorrects = np.nonzero(model.predict_class(X_test).reshape((-1,)) != y_test)

to get indices of incorrect predictions



来源:https://stackoverflow.com/questions/39300880/how-to-find-wrong-prediction-cases-in-test-set-cnns-using-keras

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!