I want to realize a digit recognition with a neural network (Encog) in Java. For this, I am drawing on a screen which I partition in same-sized rectangles for the input layer, once the recognition process starts. Only problem is that I am not entirely sure how the output layer should look like when I just want to recognize digits ranging between '0-9'(see picture below).
I suppose modelling the outputLayer for an Digit i as an array with 10 entries, where every entry is set to '0' except for the i-th entry, which is set to '1'. I think that is what a reference project did here, as far as I can see. However, is it a good practice or is there another feasable solution?
The output layer can be modeled as a vector with 10 entries, if you want to check for 10 different outputs. I have implemented it here: https://github.com/Overholt94/EncogDigitDecoder