I know I was not able to word the title of the question properly. So I am trying to explain the problem here: Suppose, I built and trained a CNN to identify numbers from 0 to 9. However, when I deployed the CNN, someone gave "#" as an input (anything but 0-9). What can I do to my neural network during training, so that it's output can say that this is none of the training characters?
I'd like to present a second example: instead of classifying, suppose we want to do denoising using an autoencoder. Again, the CNN autoencoder is trained for 0 to 9. Now, how can we prepare it so that if someone gives "$"symbol (it can be anything that is not 0-9) as an input, it'll be able to identify that this symbol is none of what it was trained on? And the CNN autoencoder will be able to give an output according to that?