Week4, Deep Neural Network, 7 - Test with your own image (optional/ungraded exercise)

Hi classmates, I finished the second assignment succesfully, now I’m running the optional “Test with your
own image(optional/ungraded exercise)”, I followed the instructions to rise and change the name of the
image of my dog “Toby” in the code:

START CODE HERE

my_image = “Toby.png” # change this to the name of your image file
my_label_y = [0] # the true class of your image (1 → cat, 0 → non-cat)

END CODE HERE

The result after running this code is:
Accuracy: 0.0
y = 1.0, your L-layer model predicts a “cat” picture.
This result is incorrect!.
What should I have to do in order to predict according to the image?

The problem is that the training set here is just too small to give us a generalizable model that can handle arbitrary input images. So your experience is not unusual. Here’s a thread which talks about this in a bit more detail.

Thanks Paul for your prompt answer.