I am trying to evaluate CNN model using two different approaches:
1.
model.evaluate(test_data)
In this case I get 79% accuracy score: [1.2163524627685547, 0.7924528121948242]
2.
I want to get the actual prediction values and use scikit-learn metrics to get accuracy score:
test_prediction=model.predict(test_data)
test_prediction=np.argmax(test_prediction, axis=1)
y_test = np.concatenate([y_batch for X_batch, y_batch in test_data])
metrics.accuracy_score(test_prediction,y_test)
The accuracy score is 21% in this case.
Why is there difference and which way is more reliable?