I am using ImageDataGenerator().flow_from_directory(...)
to generate batches of data from directories.
After the model builds successfully I\'d like to get
You can get the prediction labels by:
y_pred = numpy.rint(predictions)
and you can get the true labels by:
y_true = validation_generator.classes
You should set shuffle=False
in the validation generator before this.
Finally, you can print confusion matrix by
print confusion_matrix(y_true, y_pred)