I teach a light neural network, which I give a pixel-by-pixel image (colors of pixels) to the input and I want to get the text in the picture (I pass it on when learning)
- input neurons: height * picture width
- output neurons: 6 (constant text length)
I fann_train($ann, inputs_array, outputs_array) with fann_train($ann, inputs_array, outputs_array) for each picture (I couldn’t understand how to work fann_train_on_data , but rather how to generate a training data resource)
Here's the question
Fann on the output neurons adjusts the weights (probabilities), how to get the finished text?
Possible stupid decision (please comment on it too)
Add 1 more to the input neurons (the index of the character I want to receive), and make the number of output neurons equal to the used alphovite and receive the text using it
Cons of my decision
- New neurons are added, which means more memory
- At least 6 times reduced training time and the program in general
Ps. I don’t think that code listings are required here, but if they are needed, I’ll add to the question (code on another keeper)