# A Faster Algorithm for Reducing the Computational Complexity of Convolutional Neural Networks
## 4 Simulation Results  
Several simulations were conducted to evaluate our algorithm. We compare our algorithm with the Strassen algorithm and Winograd algorithm, measuring performance by the runtime in MATLAB R2013b (CPU: Inter(R) Core(TM) i7-3370K). For objectivity, we apply Equation (18) to the conventional algorithm and use it as a benchmark. Moreover, all the input data \(x\) and kernel \(w\) are randomly generated. We measure the accuracy of our algorithm by the absolute element error in the output feature maps. As a benchmark, we use the conventional algorithm with double precision data, kernels, middle variables and outputs. The other algorithms in this comparison use double precision data and kernels but single precision middle variables and outputs. The VGG network [1] was applied to our simulation. There are nine different convolutional layers in the VGG network. The parameters of the convolutional layer are shown in Table 2. The depth indicates the number of times a layer occurs in the network. Q indicates the number of input feature maps. R indicates the number of output feature maps. Mw and Nw represent the size of the kernel. My and Ny represent the size of the output feature map. The size of the kernel in the VGG network is \(3\times 3\). We apply F(2 \(\times\) 2, 3 \(\times\) 3) to the operation of convolution. For the computation of the output feature map with size My \(\times\) Ny, the map is partitioned into (My/2) \(\times\) (Ny/2) sets, each using one computation of F(2 \(\times\) 2, 3 \(\times\) 3). As Table 2 shows, the numbers of rows and columns are not always even, and the matrices are not always square. To solve this problem, we pad a dummy row or column in the matrices once we encounter an odd number of rows or columns. The matrix can then continue using the Strassen algorithm. We apply these nine convolutional layers in turn to our simulations. For each convolutional layer, we run the four algorithms with different batch sizes from 1 to 32. The runtime consumption of the algorithms is listed in Table 3, and the numerical accuracy of the different algorithms in different layers is shown in Table 4. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Convolutional Layer** & **1** & **2** & **3** & **4** & **5** & **6** & **7** & **8** & **9** \\ \hline \multirow{4}{*}{Parameters} & Depth & 1 & 1 & 1 & 1 & 1 & 3 & 1 & 3 & 4 \\  & Q & 3 & 64 & 64 & 128 & 128 & 256 & 256 & 512 & 512 \\ \cline{1-1}  & R & 64 & 64 & 128 & 128 & 256 & 256 & 512 & 512 & 512 \\ \cline{1-1}  & Mw(Nw) & 3 & 3 & 3 & 3 & 3 & 3 & 3 & 3 & 3 \\ \cline{1-1}  & My(Ny) & 224 & 224 & 112 & 112 & 56 & 56 & 28 & 28 & 14 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters of the convolutional layers in the Visual Geometry Group (VGG) network. Figure 2: Comparisons of the complexity ratio with different matrix sizes. Table 4 shows that the Winograd algorithm is slightly more accurate than the Strassen algorithm and Strassen-Winograd algorithm. The maximum element error of these algorithms is 6.16 \(\times\) 10\({}^{-4}\). Compared with the minimum value of 1.09 \(\times\) 10\({}^{3}\) in the output feature map, the accuracy loss incurred