# Recognition of Hand Gesture Sequences by Accelerometers and Gyroscopes
## 3 The Proposed Gesture Recognition Algorithms and Systems
### Residual PairNet  
The performance of the PairNet can be improved by the employment of short-cut connections in the network. The resulting network is termed residual PairNet in this study. Figure 6 shows an example of the Residual PairNet accommodating short-cut connections. By comparing Figure 4 with Figure 6, we can see that the Residual PairNet has two short-cut connections. The first short-cut connection is from the output of Layer \(1\) to the output of Layer \(3\). The second one is from the input of Layer \(4\) to the output of Layer \(5\).  
Figure 5: The structure of PairNet. In this example, the length of \(X_{t}\) is \(N=50\). There are seven layers in the network. Layer \(1\) is a basic convolution layer. Layers \(2\)–\(5\) are convolution layers supporting pairing operations. Layers \(6\) and \(7\) are pooling layer and fully-connected layers, respectively.  
Figure 6: The parameters of the Residual PairNet. The input \(X_{t}\) has the same dimension and number of channels as those of the input of PairNet. The network contains seven layers and two short-cut connections. Two zero-padding modules are also included for the combination of the short-cut connections with the convolutional layers. Layers \(1\)–\(5\) are convolution layers. Layer \(6\) is the average pooling layer. The number of gestures to be classified is \(Q=11\). Layer \(7\) is a fully connected layer producing \(11\) outputs.  
It can be observed from Figure 6 that the short-cut connections should be combined with the convolution layers for enhancing the performance of the network. To implement the combination, the length of the short-cut connections and the length of output of convolution layers should be identical. Because the pairing operations in the convolution layers reduce the length of their outputs, zero padding operations are included for the compensation of the length reduction in our design.  
For example, the length of the first short-cut connection is 48. The length of the output of the Layer 3 is only 12. Therefore, a module is included to increase the length of the output of Layer 3 from 12 to 48 by padding zeros to the end of the output of Layer 3. In this way, the path can be combined with the first short-cut connection, as shown in Figure 6. Similarly, another zero padding module is employed at the output of Layer 5 to facilitate the combination of this path with the second short-cut connection.  
In addition to the path length of the short-cut connection, we may need to take the number of channels into consideration for the combination of short-cut connection and convolution layers. This is particularly true for the second short-cut connection. It originates at the path with only 128 channels. Furthermore, it needs to be combined with the path containing 256 channels. This discrepancy can be solved by the employment of the convolution module with kernel size \(1\times 1\). There are 128 input channels and 256 output channels for the module. We can then see from Figure 6 that the number of channels at the output of the module is the same as that of the target path for combination. The integration of the short-cut connections to the PairNet can then be carried out.