# _k_-Labelsets Method for Multi-Label ECG Signal Classification Based on SE-ResNet
## 2 Materials and Methods
### ResNet and Squeeze and Excitation Network
#### 2.2.2 Squeeze and Excitation Network  
The squeeze and excitation network (SENet) [31] is designed to train the importance of convoluted features in the CNN training process. The goal of SENet is to recalibrate interaction between channels in the feature representation via CNN through each squeeze and excitation phase. Based on the obtained information, new weights were given for each channel to improve performance. In other words, the squeeze and excitation block (SE block) overcomes the limitations of a traditional CNN, which learned only information corresponding to a local receptive fields, and collects and delivers information on all fields. The networks can be flexibly expanded with additional SE blocks, and performance improvements can be achieved with little additional calculations. This method consists of two phases: squeeze and excitation. The squeeze step extracts the entire information corresponding to the channels. When a feature map \(X\) with \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Stage** & **18-Layers** & **34-Layers** & **50-Layers** & **101-Layers** \\ \hline conv1 & & & 7, 64, stride 2 \\ \hline \multirow{4}{*}{Block1} & \(\left[\begin{array}{cc}3&64\\ 3&64\end{array}\right]\times\)2 & \(\left[\begin{array}{cc}3&64\\ 3&64\end{array}\right]\times\)3 & \(\left[\begin{array}{cc}1&64\\ 3&64\end{array}\right]\times\)3 & \(\left[\begin{array}{cc}1&64\\ 3&64\\ 1&256\end{array}\right]\times\)3 \\ \hline Block2 & \(\left[\begin{array}{cc}3&128\\ 3&128\end{array}\right]\times\)2 & \(\left[\begin{array}{cc}3&128\\ 3&128\end{array}\right]\times\)4 & \(\left[\begin{array}{cc}1&128\\ 3&128\\ 1&512\end{array}\right]\times\)4 & \(\left[\begin{array}{cc}1&128\\ 3&128\\ 1&512\end{array}\right]\times\)3 \\ \hline Block3 & \(\left[\begin{array}{cc}3&256\\ 3&256\end{array}\right]\times\)2 & \(\left[\begin{array}{cc}3&256\\ 3&256\end{array}\right]\times\)6 & \(\left[\begin{array}{cc}1&256\\ 3&256\\ 1&1024\end{array}\right]\times\)6 & \(\left[\begin{array}{cc}1&256\\ 3&256\\ 1&1024\end{array}\right]\times\)23 \\ \hline Block4 & \(\left[\begin{array}{cc}3&512\\ 3&512\end{array}\right]\times\)2 & \(\left[\begin{array}{cc}3&512\\ 3&512\end{array}\right]\times\)3 & \(\left[\begin{array}{cc}1&512\\ 3&512\\ 1&2048\end{array}\right]\times\)3 & \(\left[\begin{array}{cc}1&512\\ 3&512\\ 1&2048\end{array}\right]\times\)3 \\ \hline FC & & & average pool, 5-d fc, sigmoid \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Architectural configurations for ResNet. Building blocks are shown in brackets, with the numbers of blocks stacked. Figure 1: The structure of residual block in ResNet when the block is composed of two convolution layers. \(C^{\prime}\times H^{\prime}\times W^{\prime}\) dimensions becomes a feature map \(U\) of \(C\times H\times W\) size through convolution layer, the size of the feature map corresponding to one channel in \(U\) is \(H\times W\). Feature maps for each channel are squeezed into 1 \(\times\) 1 feature maps using channel descriptor function, such as global average pooling (GAP) [33]. In this phase, a scalar value representing global information about the channel is created. The squeeze process represented in Equation (1), where \(u_{c}(i,j)\) denotes a feature map corresponding to channel \(c\) after \(X\) has passed convolution layer. \(\mathbf{F}_{sq}\) represents the channel descriptor function, and GAP was used in this study. \[z_{c}=\mathbf{F}_{sq}(U_{c})=\frac{1}{H\times W}\sum_{i=0}^{H}\sum_{j=0}^{W}u_{ c}(i,j) \tag{1}\]  
In the excitation step, the channel-wise dependencies are considered by using the descriptor for each channel obtained through the squeeze step. This task can be achieved through fully-connected and non-linear functions. The excitation step is shown in Equation (2), where \(z\) is the value obtained by squeeze, \(W_{i}\) are the FC layers, and \(\sigma\) is the sigmoid function. Due to the sigmoid, the output value of the excitation step has a value between 0 and 1, and it can be used as a weight for calibration.