Viper
Viper

Reputation: 121

How to find out the validation accuracy of a model after the training process?

I have trained a CNN model that recognises hand gestures. after the training part was I could not write down my val_acc value from console. Now I need to know the accuracy of my model?

Upvotes: 0

Views: 676

Answers (2)

wohe1
wohe1

Reputation: 775

If you saved your model in a hdf5 file (e.g. mymodel.h5) then you can evaluate it as follows:

from keras.models import load_model

model = load_model('mymodel.h5')
metrics = model.evaluate(x_test, y_test)

Upvotes: 1

Vaibhav Mishra
Vaibhav Mishra

Reputation: 227

model.evaluate(Xtest, ytest)

This will give the value of loss, accuracy, f1_score etc..

Upvotes: 1

Related Questions