## 2 Basic Theory of the CNN  
A CNN is a typical feedforward neural network, which is mainly composed of convolution layer, pooling layer, and fully connected layer. The essence is to extract the characteristics of input data by establishing multiple filters that are used to extract the topological features from the input data through the convolution and pooling operations. In recent years, the CNNs have performed well in image recognition and target detection tasks, and also have been able to deal with the fitting problems well; thus, the deep learning has been developing rapidly.  
In a convolutional layer, the feature map of the previous layer is a convolution with the convolutional kernels, and the nonlinear activation function constructs the output feature map. The calculation process can be expressed as:  
\[X_{j}^{l}=\int\left(\sum_{i\in M_{j}}X_{i}^{l-1}*w_{ij}^{l}+b_{j}^{l}\right) \tag{1}\]  
where \(M_{j}\) is a set of input feature map, \(l\) denotes the \(l^{th}\) layer, \(X_{i}^{l-1}\) denotes the \(i^{th}\) input feature map of the \(\left(l-1\right)^{th}\) layer, \(w_{ij}^{l}\) denotes the convolutional kernel which connects the \(i^{th}\) input feature map with \(j^{th}\) feature map, \(b\) denotes the bias, \(X_{j}^{l}\) denotes the \(jth\) input feature map at \(l^{th}\) layer, \(f(\cdot)\) is a nonlinear activation function, and lastly, \(*\) stands for the convolution operation.  
The nonlinear activation function used in a neural network can be a rectified linear units (ReLU), a sigmoid function, and a hyperbolic tangent function. By considering the factors, such as gradient disappearance and calculation cost, this paper selects the ReLU activation function, which is defined as:  
\[f(x)=\max(0,x) \tag{2}\]  
The pooling layer is used to reduce the dimension of the input feature map, which can reduce the parameters of the whole network, effectively reducing the over-fitting and the amount of calculation. The calculation process of the pooling layer is given by:  
\[X_{j}^{l}=f\left(\beta_{j}^{l}\cdot down\left(X_{j}^{l-1}\right)+b_{j}^{l}\right) \tag{3}\]  
where \(\beta\) and \(b\) are the multiplicative bias and additive bias, respectively, \(down(\cdot)\) denotes a subsampling function, and \(down(\cdot)\) mainly includes average pooling function, max-pooling function. After pooling operation, the number of feature maps has not changed, but the scale of feature maps shrinks a certain multiple which is determined by the pool factor size.  
The fully connected layer converts the feature map into a one-dimensional feature vector that is entered into the classifier. In addition, the loss function includes mean-squared error, cross-entropy, logarithmic is significant to the CNN performance. In this paper, the cross-entropy cost function is used, which is defined as:  
\[E=-\frac{1}{m}\sum_{k=1}^{m}\left(y_{k}^{n}\ln l_{k}^{m}+\left(1-y_{k}^{n} \right)\ln\left(1-l_{k}^{m}\right)\right)^{2} \tag{4}\]  
where \(m\) denotes the number of samples, \(l\) and \(y\) denote the predicted value and real value of a sample, respectively.  
The network parameters are updated using the BP algorithm by calculating the gradient of the weight loss function of all the CNN layers. The objective is to minimize the loss function value by reducing the contributions of network parameters [36].