W2_A2_Test with your own image (optional/ungraded exercise)

Is it not necessary that your model predict the accurately each time?

If its a binary classification or even a multi class type which conditions the presence of one class as the outcome, then it has to predict one the required classes.

No model no matter how accurate it is in training and testing will predict 100 percent correctly, thats why we deal with propabilities here, we measure accuracy. And thats alright, otherwise if a model would be 100 percent correct all the time, not only defies the maths behind it but is something that indicates something is wrong with the model itself.

May be try testing a dog’s picture, and then a cat’s picture, uploaded from your own source, and see how it works.

1 Like

Yes, a lot of people notice that the model we get here does not do very well on new images. The problem is fundamentally that the datasets here are too small to get a generalizable solution. Here’s a thread that discusses that in more detail.

We’ll try this cat recognition task with the same dataset again in Week 4 with a real 4 layer neural network and it will do better than Logistic Regression, but it still will not do very well on new images. Here’s a thread that does some experiments with rebalancing the input datasets to see how that affects the results.