Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Y_True value of validation generator #123

Open
Devine43 opened this issue Mar 14, 2019 · 0 comments
Open

Y_True value of validation generator #123

Devine43 opened this issue Mar 14, 2019 · 0 comments

Comments

@Devine43
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant