An illustration of the principle of cnn
An illustration of the principle of cnn is the use of convolution (convolve) and activationfunction (activationfunction) for feature extraction to obtain a new type of neural network model.
ConvolutionalNeuralNetwork (CNN) is a deep learning model specialized in processing data with a grid-like structure, such as images, speech signals, etc. CNN can effectively reduce the model through the principles of local awareness, shared weights, and step-by-step computation. principles, it can effectively reduce the number of parameters of the model and improve the generalization ability and computational efficiency of the model.
In CNN, each neuron is connected to only a local region of the input data, i.e., each neuron receives only a small part of the input data. This localized perception allows the CNN to better capture the local features of the input data and reduces the number of parameters, decreasing the complexity of the model.
In CNNs, the same convolution kernel (also known as a filter or weight matrix) can be reused multiple times to perform convolution operations on the input data. This strategy of sharing weights not only reduces the number of parameters in the model, but also enhances the spatial invariance of the model to the input data.
The step-by-step computation of CNN consists of two steps: convolutional computation and activation function. In convolutional computation, each neuron multiplies the input data point-by-point with the convolutional kernel and then adds up the results as the neuron’s output; in the activation function, the neuron’s output is passed through a nonlinear function (e.g., ReLU) to increase the expressive power of the model.
Pooling operation (Pooling) is an important technique in CNNs to reduce the dimensionality of the input data while retaining important features. Pooling operations can be Maximum Pooling, Average Pooling, L2 Paradigm Pooling, etc. Pooling operations enhance the robustness of the model and reduce the risk of overfitting.
CNNs usually consist of multiple hierarchies, each of which consists of multiple convolutional layers and pooling layers alternately. These hierarchies can enable CNNs to gradually extract more advanced features. For example, in image recognition tasks, the bottom layer of a CNN can extract basic features such as edges and textures, and the higher layers can extract advanced features such as the shape and position of objects.
The CNN training process uses a backpropagation algorithm to update the weights of the model. The backpropagation algorithm can be divided into two stages: forward propagation and backpropagation. In forward propagation, the input data passes through the convolutional and pooling layers of the CNN to get the output results; in backpropagation, the error gradient of each neuron is calculated based on the difference between the output results and the true label, and then the weights of each neuron are updated.
In short, CNN, as a powerful deep learning model, has been widely used in image processing, natural language processing, speech recognition and other fields. It can effectively reduce the complexity of the model and improve the generalization ability and computational efficiency of the model through the principles of local perception, shared weights, step-by-step computation, pooling operation and multi-level structure.
What are the models of convolutional neural network
What are the models of convolutional neural network
The models of convolutional neural network are as follows:
1, LeNet-5 model
In the application of CNN, LeNet-5 model used in the text recognition system is a very classic model.
The LeNet-5 model was proposed by Prof. YannLeCun in 1998, which is the first convolutional neural network that has been successfully applied to handwritten digit recognition problem on a large scale. Convolutional neural network successfully applied on a large scale to the problem of handwritten digit recognition, the correct rate in the MNIST dataset can be as high as 99.2%.
The LeNet-5 model has a total of seven layers, each of which contains numerous parameters, the same parameters used in a convolutional neural network. Although the number of layers is only 7, which is very few in today’s huge neural networks, it contains a convolutional layer, a pooling layer, and a fully-connected layer, so it’s pretty small. For convenience, we’ll call the convolutional layer the C layer and the downsampling layer the downsampling layer.
2, AlexNet model
2012 Imagenet Image Recognition Competition, Alext proposed alexnet network model a hit, detonated the application of neural networks boom, and won the 2012 Image Recognition Competition, which also makes the convolutional neural network truly become the core algorithm on image processing.
The LeNet-5 introduced above appeared in the last century, and although it is a classic, it can only be applied in some fields due to the limitations of various complex real-world scenarios. However, with the rapid development of hand-designed features such as SVM, LeNet-5 has not developed a great application situation.
With the proposal of ReLU and dropout, as well as the GPU to bring arithmetic breakthroughs and the explosion of big data in the Internet era, convolutional neural networks bring historical breakthroughs, and the proposal of AlexNet puts deep learning on the forefront of artificial intelligence.