Neural Network: implementing Counter Propagation

In this post i report a simple implementation of a Counter Propagation Neural Network.
As for the following examples i will post the goal is character recognition on a grid of pixels. 
Noise is introduce to evaluate robustness of the approach.

Here we will present both implementation and performance evalu- 
ation of an artificial neural network based on the Counter Propagation 
applied to characters recognition.

 
This documentation provide full description of the approach and the results.
This is the source code for the neural network