# Human Action Representation Learning Using an Attention-Driven Residual 3 DCNN Network
## 3 Proposed DA-R3 DCNN Human Activity Recognition Framework
### 3D Residual Convolution Block  
To limit the propagation of vanishing gradients across the network layers, we used a 3D residual convolution mechanism inspired by the 2D residual convolution in [25], with convoluted shortcut path. As shown in Figure 2, the utilized 3D residual convolution block consists of three convolution layers, with one additional convolution layer over the shortcut path, where each convolution layer is binned with a batch normalization layer. The second convolution layer in the residual block operates a \(3\times 3\) size kernel, where the first, third, and the shortcut path convolution layers operate \(1\times 1\) size kernels. Unlike, the original residual block presented in [25], in this paper, we used 3D convolution block containing 3D convolution layers instead of 2D convolution layers. Further, instead of using a plain shortcut path as used in [25], in this paper, we used a 3D convoluted shortcut path to ensure the compatibility of input and output dimensions. The 3D residual convolution block used in this paper consists of two key components, the residual mapping and the shortcut path (skip connection). Mathematically, the utilized 3D residual convolution block can be expressed as follows:  
\[y=g(x,w)+x^{\prime}, \tag{1}\]  
where \(x\) is the input of the residual block and \(g\) represents the mapping function (convolution layers of the residual block), which learns the mapping (transforming input to output) between input and output using a set of weights represented by \(w\). The variable \(x^{\prime}\) represents the convoluted shortcut path having \(1\times 1\times 1\) convolution, which enables the gradients to flow more easily through the network layers resulting in better performance. Finally, variable \(y\) denotes the weighted mapping of input to output of the residual block.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Layer** & **Input Channels** & **Number of Kernels** & **Kernel Size** & **Activation** & **Padding** & **Output Channels** \\ \hline Conv 1 + BN & 3 & 128 & \(3\times 3\times 3\) & ReLU & 1 & 128 \\ \hline \multicolumn{7}{c}{3D Max pooling Layer 1} \\ \hline Conv 2 + BN & 128 & 128 & \(3\times 3\times 3\) & ReLU & 1 & 128 \\ \hline \multicolumn{7}{c}{Channel + Spatial Attention Module 1} \\ \hline \multicolumn{7}{c}{3D Residual Block 1} \\ \hline \multicolumn{7}{c}{3D Max pooling Layer 2} \\ \hline Conv 3 + BN & 128 & 128 & \(3\times 3\times 3\) & ReLU & 1 & 128 \\ Conv 4 + BN & 128 & 128 & \(3\times 3\times 3\) & ReLU & 1 & 128 \\ \hline \multicolumn{7}{c}{Channel + Spatial Attention Module 2} \\ \hline \multicolumn{7}{c}{3D Residual Block 2} \\ \hline \multicolumn{7}{c}{3D Max pooling Layer 3} \\ \hline Conv 5 + BN & 128 & 128 & \(3\times 3\times 3\) & ReLU & 1 & 128 \\ Conv 6 + BN & 128 & 128 & \(3\times 3\times 3\) & ReLU & 1 & 128 \\ \hline \multicolumn{7}{c}{Channel + Spatial Attention Module 3} \\ \hline \multicolumn{7}{c}{3D Residual Block 3} \\ \hline \multicolumn{7}{c}{3D Max pooling Layer 4} \\ \hline Conv 7 + BN & 128 & 128 & \(3\times 3\times 3\) & ReLU & 1 & 128 \\ Conv 8 + BN & 128 & 128 & \(3\times 3\times 3\) & ReLU & 1 & 128 \\ \hline \multicolumn{7}{c}{Channel + Spatial Attention Module 4} \\ \hline \multicolumn{7}{c}{3D Residual Block 4} \\ \hline \multicolumn{7}{c}{3D Max pooling Layer 5} \\ \hline \multicolumn{7}{c}{3D Average Pooling Layer} \\ \hline \multicolumn{7}{c}{FC1-(512)} \\ \hline \multicolumn{7}{c}{FC2-(512)} \\ \hline \multicolumn{7}{c}{Softmax (Number of classes)} \\ \hline \hline \end{tabular}
\end{table}
Table 1: Architectural overview of our proposed DA-R3 DCNN Framework.