Should I train my classifier with examples that are outside my classes of interest? And should I create an "others" class to handle them? This is a 2 part question regarding a multi-class classifier based on a neural network that is expected to predict whether the input image has a cat or a dog. If shown something different (like a man), it shouldn't predict either cat or dog.
Q#1:
Should I train the model with examples that don't contain cat or dog so as to make it able to handle such cases?
Q#2:
How many output nodes (2 or 3) do I need in the output layer of a neural network?
2 node output layer:
1st output node: Cat, yes/no
2nd output node: Dog, yes/no

Expected predictions
Cat -> [1, 0]
Dog -> [0, 1]
Man -> [0, 0]

3 node output layer:
1st output node: Cat, yes/no
2nd output node: Dog, yes/no
3rd output node: Others, yes/no

Expected predictions
Cat -> [1, 0, 0]
Dog -> [0, 1, 0]
Man -> [0, 0, 1]


For sure, you should have other images in addition to cats and dogs in your training, validation and test. For the output layer, have a softmax output layer with three classes. In the two output node case, you won't be able to use softmax and will need to choose two thresholds for outputting yes/no. You may sometimes even get two yes's.
