five-video-classification-methods icon indicating copy to clipboard operation
five-video-classification-methods copied to clipboard

Y_True value of validation generator

Open Devine43 opened this issue 5 years ago • 0 comments

Hi I was wondering if someone would be able to tell me how to get the y_true values from the validation generator. I am using the conv_3d model and I want to create a classification report using the sklearn.mertrics.classification report. it requires the y_true and then y_predictions. I have the following code:

        print("[INFO] Get Predictions")
        predictions = rm.model.predict_generator(val_generator, 24, verbose=1)
        y_preds = np.argmax(predictions, axis=-1) 
        y_true = val_generator.argmax(axis=-1)
        cr = classification_report(y_true, y_preds)

Devine43 avatar Mar 14 '19 14:03 Devine43