简体   繁体   中英

Extract probability values for classification Keras when using validation_data

I have a model and fit it using the following:

model.fit(Xtrain, ytrain, epochs = epochs, verbose = 2, batch_size = 1000, shuffle = True, validation_data = (Xtest, ytest))

However, when using the built in validation_data option, I cannot find a way to extract the probability values and class assignments for the validation set.

I am thinking of implementing this with a callback, similar to the situation here https://github.com/keras-team/keras/issues/2548 , but I am unsure how to do so.

Try using predict_prob

You can also find the same question of this stackexchange

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM