## 2 The Proposed Theory
### Classification Network Structure Design
#### 2.3.2 The Proposed Self-Adaptive Residual Shrinkage Network (SARSN)  
Based on RSBU, this paper proposes combining the attention mechanism module and self-adaptive directional derivative threshold module (SADDT) to obtain an adaptive residual shrinkage network (SARSN). Figure 5 shows that this paper adds an attention mechanism branch after two BNs, two ReLUs, and two convolution layers, which can automatically infer a suitable parameter, namely the self-adaptive directional derivative (SADDT), and the function of the soft threshold function is replaced by the SADDT. Parallel branches can make the neural network direct more attention to details effectively, and finally import into the backbone output of the neural network is ultimately imported through the feed-forward channel. A schematic diagram of the SARSN backbone network is shown in Figure 6.  
The input channel is 1 \(\times\) 3 \(\times\) 64 \(\times\) 64. After entering the SARAN backbone network, the feature map of 1 \(\times\) 64 \(\times\) 64 \(\times\) 64 is first obtained through the Conv, ReLU, and BN layers, and then the feature map of 1 \(\times\) 512 \(\times\) 16 \(\times\) 16 is sequentially obtained through Sequential composed of four different numbers of BasicBlock, and the final the output is determined to be 1 \(\times\) 512 \(\times\) 1  
Figure 4: Schematic diagram of the residual learning unit. (**a**) Building block, (**b**) bottleneck, (**c**) architecture of a Res Net, and (**d**) architecture of RSBU. Figure 5: The architecture of SARSN. Attention mechanism and squeeze-and-excitation networks:  
At present, attention mechanisms in the field of computer vision mainly include squeeze-and-excitation networks [23], spatial transformer networks (STN) [24] and the convolutional block attention module (CBAM) [25]. The method proposed in this paper uses SE-Net to learn a set of correlation weights to adjust the size of each feature channel, which is equivalent to giving each feature channel different degrees of attention. The network can selectively pay attention to some local information and ignore useless information. The model adopts a small subnetwork structure without introducing extra parameters and computational complexity. The statistic \(R\) is a value obtained by shrinking\(f\) in the \(W\times H\) dimension space. The calculation formula of the parameter \(R\) is shown in Formula (5)  
\[R_{s}=\frac{1}{W\times H}\sum_{u=1}^{H}\sum_{v=1}^{W}f_{s}(u,v). \tag{5}\]  
where \(f\) and \(R\) represent the input and output of the extrusion operation, respectively, \(u\), \(v\), and \(s\) represent the width, height and channel number of the feature map, and \(W\) and \(H\) represent the width and height of the input feature map, respectively. To quickly extract helpful feature information during the extrusion operation, the network not only needs to obtain the combination of nonlinear relationships among channels, but also needs to ensure that multiple channels can be activated. Generally, the bottleneck structure is selected to complete this operation. First, the dimension is reduced from c to c/r, and the output signal is matched with the input. The calculation process is shown in Formula (6)  
\[\alpha=\sigma(W_{2}ReLU(W_{1}t)). \tag{6}\]  
where \(W_{1}\in\mathbb{R}^{c\times\frac{c}{r}}\), \(W_{2}\in\mathbb{R}^{\frac{c}{r}\times c}\) represent the weight and deviation values, respectively, \(\sigma(\ldots)\) and \(ReLU(\ldots)\) are activation functions and \(\alpha\) is the output of excitation, which reflects the importance of each channel. The output of the SE loop obtained by activating \(\alpha\) is shown in formula (7):  
\[\widetilde{x}_{n}=e_{n}x_{n}. \tag{7}\]  
where \(\widetilde{x}_{n}=[\widetilde{x}_{1},\widetilde{x}_{2},\ldots,\widetilde{x}_ {n}]\) is the output of the nth feature map and \(e_{k}\) means the weight, which represents the priority of the nth pass.