CNN模型验证和CNN模型保存
代码:
test_loss,test_acc=model.evaluate(x=X_test,y=mnist.test.labels)
print("Test Accuracy %.2f"%test_acc)
输出:
10000/10000 [==============================] - 2s 185us/sample - loss: 0.0239 - acc: 0.9921
Test Accuracy 0.99
最终结果也达到了99%的准确率。
CNN模型保存
代码:
test_loss,test_acc=model.evaluate(x=X_test,y=y_test)
print("Test Accuracy %.2f"%test_acc)
输出:
10000/10000 [==============================] - 5s 489us/sample - loss: 0.0263 - acc: 0.9920s - loss: 0.0273 - ac
Test Accuracy 0.99