I am calling model.predict_generator()
method for predictions on Test data-set. My question is how can I retrieve test accuracy ? Following is my code line:
predictions = model.predict_generator(test_images, steps=3, verbose=0)
Where test_iamges
in the parameter of predict_generator
function has batch data retrieved from local disk by calling ImageDataGenerator
Any guidance will be highly appreciated.
Thanks
There is a corresponding function model.evaluate_generator
that will give the loss, acc etc on your test set but not the predictions. Have a look at the model documentation, ex:
loss, acc = model.evaluate_generator(test_images, steps=3, verbose=0)
Returns: Scalar test loss (if the model has a single output and no metrics) or list of scalars (if the model has multiple outputs and/or metrics).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With