Apr-14-2019, 12:28 PM
Something like this, but not tested:
import numpy as np # move to the beginning of the file from sklearn.metrics import confusion_matrix # .... _ = classifier.predict_generator(test_set, num_of_test_samples // batch_size+1) y_pred = np.argmax(_, axis=1) print('Confusion Matrix') print(confusion_matrix(test_set.classes, y_pred))