I’ve built a model that classifies digits from 0-9. My dataset is tf.keras.datasets.mnist. I use softmax as the activation function for the output layer.
The output layer should consist of 10 neurons. Each representing a digit from 0-9. But even when I change the number of output layer neurons to 20, the predictions are accurate. Seems as if even though I only need to predict 10 digits, I can have more than 10 neurons in the output layer. Why’s that?
Also, the prediction is a list of lists right. Each list containing probabilities corresponding to 10 neurons and we take the neuron having the highest probability. My question is, suppose the 6th neuron has the highest probability, how do I know what digit(label) is assigned to it?
I’m a complete newbie to deep learning, so please dumb it down for me.