Sample program download: http://files.cnblogs.com/gpcuster/ANN1.rar
If you have any questions, refer to the FAQ first.
If you do not find a satisfactory answer, you can leave a message below :)
1 Introduction
I still remember hearing from senior students about Ann (Artificial Neural Network) when I first came into contact with RoboCup two years ago. This is amazing, he can learn to solve some problems well. Just like our people, we can learn and learn new things.
But I have been trying to learn Ann for two years, but I have never succeeded. There are many reasons. The main reason is that the introduction of this technology in our domestic tutorials is too theoretical, so that we have a poor foundation and are discouraged by our own scholars.
Now, I hope to use a simple example to give you a perceptual knowledge and then learn some relevant theories to achieve better learning results.
2. Use and description of sample programs
Two simple operations are provided in this example:
1 and operations: Common sum operations, such as: 1 and 0 = 1
2 or operations: Common sum operations, such as: 1 or 0 = 1
After starting the program, you will see the following interface:
Click "Start Training and", the program starts training and calculation, and prompts us after training.
At the same time, the interface becomes as follows:
You only need to click the "0 0" button to display the trained ANN calculated results under the "calculation result.
As follows:
"Calculation result" is displayed as "1.74e-10", indicating 0 and 0 = 0.
This result is what we want. Training successful
The usage of other buttons is similar :)
3. computing process
We can refer to the overall operation process of and computing:
// Initialize the training set
Trainset [] sets = new trainset [] {New trainset (0, 0, 0), new trainset (0, 1, 0 ),
New trainset (1, 0, 0), new trainset (1, 1, 1 )};
// Construct two input nodes and one output node of a single-layer Neural Network
Neuralnetwork nn = new neuralnetwork (2, 1 );
Slnn = new singlelayerneuralnetworks (NN, sets );
// Training
Slnn. Train ();
MessageBox. Show ("and computing training ends ");
This. button2.enabled = true;
This. button3.enabled = true;
This. button4.enabled = true;
This. button1.enabled = true;
This. Text = "and operation ";
OK. The code above shows that our neural network has two input nodes, two parameters used for input and operation. One output node is used to output one result of the and operation.
Next, our single-layer neural network starts training through a training set (with a set of inputs and expected output data. After training, we can use the corresponding data to test the training results (through the "0 0" button ).
4. Advance Notice
In the next article, I will introduce the basic probability of ANN and the implementation principles of this example :)
5Summary
In this article, we will introduce a simple and easy-to-understand program example based on a single-layer neural network, so that you can have a perceptual knowledge first.