hi evereyone,
I´m working in a project in which I have to recognize manuscript characters. I alredy have the data corpus in this case are the numbers from 0 to 9,
they are in bmp format. Then I do the processing and resize de 16x16. I convert the image in a vector of 256 Which I introduce to my network neuronal.
The enter vector is 1x256
The exit is this array
double[][] output = new double[10][] {new double[]{ 1d, 0d, 0d, 0d, 0d, 0d, 0d, 0d, 0d, 0d },
new double[]{ 0d, 1d, 0d, 0d, 0d, 0d, 0d, 0d, 0d, 0d },
new double[]{ 0d, 0d, 1d, 0d, 0d, 0d, 0d, 0d, 0d, 0d },
new double[]{ 0d, 0d, 0d, 1d, 0d, 0d, 0d, 0d, 0d, 0d },
new double[]{ 0d, 0d, 0d, 0d, 1d, 0d, 0d, 0d, 0d, 0d },
new double[]{ 0d, 0d, 0d, 0d, 0d, 1d, 0d, 0d, 0d, 0d },
new double[]{ 0d, 0d, 0d, 0d, 0d, 0d, 1d, 0d, 0d, 0d },
new double[]{ 0d, 0d, 0d, 0d, 0d, 0d, 0d, 1d, 0d, 0d },
new double[]{ 0d, 0d, 0d, 0d, 0d, 0d, 0d, 0d, 1d, 0d },
new double[]{ 0d, 0d, 0d, 0d, 0d, 0d, 0d, 0d, 0d, 1d }
};
I train my network first for the number 0 using 90 samples and left the number 9 to make the test. When I introduce the image test which went convert
to a vector 1x256 I have a problem. With the number 0 is fine but when I introduce other number like 5 for example, is the same result of using 0.
This is the fragment of my network code:
private BackpropagationNetwork Caracteres_Network;
LinearLayer inputLayer = new LinearLayer(257);
SigmoidLayer hiddenLayer = new SigmoidLayer(10);
SigmoidLayer outputLayer = new SigmoidLayer(10);
// Conecamos las capa de entrada con la capa intermedia
// y la intermedia con las de salida
new BackpropagationConnector(inputLayer, hiddenLayer);
new BackpropagationConnector(hiddenLayer, outputLayer);
Caracteres_Network = new BackpropagationNetwork(inputLayer, outputLayer);
Caracteres_Network.SetLearningRate(learningRate);
TrainingSet trainingSet = new TrainingSet(257, 10);
trainingSet.Add(new TrainingSample(Rna_In,output[0]));
