The goal is to get a fluffy understanding of the big picture of neural networks. I don't use mathematical formulas, so please take a look even if you are allergic to mathematics.
A neural network is something like the one below. Since it is a Neural Network when written in English, it is often abbreviated as NN. So this time I will explain with NN
The round one is called a "unit", and the line connecting the units is called a "synapse". Since it is troublesome to call it a synapse, let me explain it by calling it a "line" this time.
NN has a layered structure. Generally, the first layer and the second layer from the left are counted. The first layer is called the "input layer", the last layer is called the "output layer", and the spaces are collectively called the "intermediate layer (hidden layer)". Below is a 4-layer NN diagram.
Let's take a closer look. The round one is called a "unit". The unit has one number.
Units are sometimes called "neurons". It's OK to recognize that all of Soyu's are "round ones".
The number of a unit goes through a "line" (synapse) to the next unit. The numbers will be added to the next unit.
The value changes as you pass through the line. For example, as shown below, when the number "3" of the previous unit passes through the line, "x2" is calculated and "6" is added to the next unit. This "x2" is called "weight". It is an image that the line has the number x2.
The value of "weight" is different for each line. For example, if one unit is connected to three next units, as shown below, the numbers will advance along the three lines.
Consider the case where the three lines have "weights" of x2, x-4, and x3, respectively. The "3" of the previous unit is multiplied by each "weight" and added to the next unit.
The figure below shows the time when three previous units are connected to one next unit. In this case as well, the results of "13 * 2", "-2 * -4", and "-9 * 3" are added one after another, and the value of the next unit becomes "7".
And again, it feels like that "7" is moving on to the next unit.
The NN is calculated as described above. Overall, if you put a number in the "input layer" of NN, various calculations will be done through NN and the result will come out in the "output layer".
In the input layer, enter the "data" that you want artificial intelligence to learn, but in the NN, also enter "numbers other than data". This is called "bias".
Bias is an image attached to each layer, as shown in the image below. To be precise, each unit has one different bias.
When the number of the previous unit is added to the next unit, this "bias" number is also added. The bias line has no weight.
There is one more rule. The unit numbers change just before going to the line. The image looks like the image below.
The value of this changes according to the rule of "activation function". There are many types of activation functions, but the most famous is the activation function called "ReLU function".
The ReLU function is a rule that "if the unit value is 0 or less, change it to 0, and if it exceeds 0, pass it as it is".
The value of the unit changed in this way advances to the line.
Organize it. As a flow, The value of the unit changes according to the rules of the activation function → it changes again when the number passes through the synapse (line) → the number and bias are added to the next unit more and more.
By the way, changing the value depending on the activation function is called "activating".
If you enter a number in the "input layer" of NN, various calculations will be performed through NN and the result will appear in the "output layer".
In detail, The value of the unit changes according to the rules of the activation function → it changes again when the number passes through the synapse (line) → the number and bias are added to the next unit more and more.
In addition, the synapse "weight (x how many times)" and "bias" are initially set to random values.
Updating this number steadily is called "learning". By updating the "weight" and "bias", the goal of NN is to create a nice output.
I explained the basic flow of NN. It's the basics of the basics, so all you have to do is get a rough idea of the image.
that's all! Have a nice NN life!
** "AI for cat allergies" ** https://t.co/4ltE8gzBVv?amp=1 We publish about machine learning on YouTube. If you have time, please take a look.
created by NekoAllergy
Recommended Posts