# Blister Defect Detection Based on Convolutional Neural Network for Polymer Lithium-Ion Battery
## 2 Blister Defect Detection for PLB Based on CNN
### Training Method Based on Optimization of Learning Rate  
Learning rate is an important super-parameter in CNN. How to adjust the learning rate is one of the key elements for training a good CNN model. When the learning rate is too large, the learning process becomes unstable, and small learning rate leads to extremely long training time. By properly setting the learning rate, it is possible to reasonably improve the training speed and reduce the training time while stabilizing the training. When the number of samples is large, the calculation of gradient descent processing on the entire sample is slow and inefficient. The method of dividing the samples into mini-batch is usually used to increase the speed. Let \(x\) be the input of CNN network in mini-batch processing, \(w\) be the network parameter, \(l\) be the learning rate, and the output is  
\[y=g(x,w). \tag{3}\]  
Using loss function can obtain the loss by comparing the output \(y\) with its label. The gradient is obtained with \(\bigtriangledown w=\partial C/\partial w\). \(w\) is updated as  
\[w^{t+1}=w^{t}-l\cdot\bigtriangledown w^{t}, \tag{4}\]  
where \(t\) is the current iteration number. In the process of above mini-batch-based learning, after the current mini-batch parameter \(w\) is updated, the processing and parameters of the next mini-batch data are continuously updated. However, the effect of parameter update for mini-batch learning has not been verified in this process. At the same time, the learning rate is usually manually selected based on experience, so it is likely that the calculation loss of the current mini-batch cannot be effectively reduced. In this paper, a mechanism for optimizing the learning rate is provided. For each mini-batch, the optimal learning rate is found before the update formula (Equation (4)) is applied. Thus, the current mini-batch can reduce the loss function value. In other words, the original mini-batch does not guarantee that each update will be done in the direction of the correct gradient. The mechanism provided in this paper makes mini-batch update in the correct direction every time, which improves the efficiency of training and reduces the training time. Flower pollination algorithm (FPA) is a new optimization algorithm of meta heuristic swarm intelligent. FPA is optimized by simulating the pollination process of flowering plants in nature. The pollination process includes two modes, self-pollination and cross-pollination, which represent local search and global search, respectively. Cross-pollination occurs between the pollens of different plants. Pollinators can fly for a long time and transmit pollen over a long distance. In contrast, self-pollination is the implantation of the same flower or different flowers of the same plant in the pollen, usually without pollinators. In the existing engineering applications, FPA shows the ability to search in the space with multiple local optima adaptively. FPA can avoid premature convergence, thus it has better performance. FPA uses four rules as follows [48; 49]. Figure 5: Proposed CNN architecture for blister detection. Rule 1. Biological biotic and cross-pollination is a process of global pollination by pollinators with pollen. Rule 2. Biological abiotic and self-pollination is the process of local pollination. Rule 3. Flower constancy. Plants and pollinators form a partnership to maximize the reproduction. Rule 4. Switch probability controls the conversion between global pollination and local pollination. FPA has achieved good results in solving multi-objective optimization problem and other application problems [50; 51; 52; 53]. FPA has robust performance for applications. FPA has only few parameters. FPA is employed to find optimal learning rate in this paper. FPA simulates two kinds of pollination, which are cross-pollination and self-pollination. Each flower in FPA is regarded as a solution to the destination function. Cross-pollination or self-pollination is selected by a flower to reproduce.