Reputation: 15
so if I have two labels "dogs" and "cats" and I want to create multi classification neural network.
now if I provided a new random image which is not a dog or a cat, is there a way I can teach the classifier to tell me that this image is not a dog or a cat instead of saying how much percent it maybe cat or dog?
Upvotes: 0
Views: 92
Reputation: 782
The best way to accomplish this is to create a new class in addition to dog and cat to handle images you have no interest in. So now, your labels would be ["dogs", "cats", "other"]
.
In your current architecture, your model is forced to predict a random image as either a dog or cat as those are the only two options it has. Adding a new class to deal with other images is generally the easiest way to make your classifier more robust to incorrect predictions.
Upvotes: 1