0

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?

osama
  • 15
  • 2

1 Answers1

1

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.

Anshul Rai
  • 772
  • 7
  • 21