I'm trying to obtain a confusion matrix using scikit after training my model but since I used flow_from_directory, I don't have access to the data and labels or I don't know a way to do so. Since scikit confusion matrix method is used like:
confusion_matrix(y_true, y_pred)
and flow_from_directory doesn't return the true labels. Is there a way to obtain them from flow_from_directory directly or any other method?