my code: https://colab.research.google.com/drive/1gBwfuR-i81Oa2DxKJtfwQTwUyPHCkqua?usp=sharing
link to challenge: https://colab.research.google.com/drive/1UCHiRuBLxo0S3aMuiDXlaP54LsxzrXHz
In this section of the cats and dog challenge,
//---------------------------------------------------------------------------------------
Now it is time to use your model to predict whether a brand new image is a cat or a dog.
In this final cell, get the probability that each test image (from test_data_gen
) is a dog or a cat. probabilities
should be a list of integers.
Call the plotImages
function and pass in the test images and the probabilities corresponding to each test image.
After your run the cell, you should see all 50 test images with a label showing the percentage sure that the image is a cat or a dog. The accuracy will correspond to the accuracy shown in the graph above (after running the previous cell). More training images could lead to a higher accuracy.
//-----------------------------------------------------------------------------------------
I am not able to plot the test images using plotImages function. I have tried alot of combinations to try and get it to work but have not been successful.
plotImages(test_data_gen,probabilities=prediction)
is what i expect to be written but gets the error:
TypeError: Invalid shape (1, 150, 150, 3) for image data
However if i run the test block i do pass.