training feedforward neural network for OCR [close

2019-01-17 04:51发布

currently im learning about neural networks and im trying to create an application that can be trained to recognize handwritten characters. for this problem i use a feedforward neural network and it seems to work when i train it to recognize 1, 2 or 3 different characters. but when i try to make the network learn more than 3 characters it will stagnate at a error percentage around the 40 - 60%.

i tried multiple layers, less/ more amount of neurons but i can't seem to get it right, now im wondering if a feedforward neural network is capable of recognizing that much info.

some statistics:

network type: feedforward neural network.

input neurons: 100 (a 10 * 10) grid is used to draw the characters

output neurons: the amount of characters to regocnize

does anyone know what's the possible flaw in my architecture is? are there too much input neurons? is the feedforward neural network not capable of character regocnition?

thanks in advance.

4条回答
劳资没心,怎么记你
2楼-- · 2019-01-17 05:24

I had a similar problem some time ago trying to identify handwritten digits using the MNIST dataset. My feedforward neural net was giving an accuracy of about 92% on the validation set but was frequently misclassifying the images I gave it.

I fixed this problem by adding a hidden layer in my net and using RMSProp. The net now gives around 97% accuracy and correctly classifies the images that I give it.

Moreover, if your cost isn't decreasing, it probably means that your ng rate is too high or your net is probably stuck in a local minima. In such a situation, you could try decreasing your learning rate and initial weights.

查看更多
\"骚年 ilove
3楼-- · 2019-01-17 05:31

You probably want to follow Lectures 3 and 4 at http://www.ml-class.org. Professor Ng has solved this exact problem. He is classifying 10 digits (0...9). Some of the things that he did in the class that gets him to a 95% training accuracy are :

  • Input Nueron : 400 (20x20)
    • Hidden Layers : 2
    • Size of hidden layers : 25
    • Activation function : sigmoid
    • Training method : gradient descent
    • Data size : 5000
查看更多
对你真心纯属浪费
4楼-- · 2019-01-17 05:45

For handwritten character recognition you need

  1. many training examples (maybe you should create distortions of your training set)
  2. softmax activation function in the output layer
  3. cross entropy error function
  4. training with stochastic gradient descent
  5. a bias in each layer

A good test problem is the handwritten digit data set MNIST. Here are papers that successfully applied neural networks on this data set:

Y. LeCun, L. Bottou, Y. Bengio and P. Haffner: Gradient-Based Learning Applied to Document Recognition, http://yann.lecun.com/exdb/publis/pdf/lecun-98.pdf

Dan Claudiu Ciresan, Ueli Meier, Luca Maria Gambardella, Juergen Schmidhuber: Deep Big Simple Neural Nets Excel on Handwritten Digit Recognition, http://arxiv.org/abs/1003.0358

I trained an MLP with 784-200-50-10 architecture and got >96% accuracy on the test set.

查看更多
太酷不给撩
5楼-- · 2019-01-17 05:45
登录 后发表回答