@@ -258,8 +258,7 @@ be written using matrices as Equation
258258:eqref:` ch-deploy/conv-matmul-one-dimension ` , which contains six
259259multiplications and four additions.
260260
261- $$
262- \textit{\textbf{F}}(2, 3)=
261+ $$ \textit{\textbf{F}}(2, 3)=
263262\left[ \begin{matrix} d_0 & d_1 & d_2 \\ d_1 & d_2 & d_3 \end{matrix} \right] \times \left[ \begin{matrix} g_0 \\ g_1 \\ g_2 \end{matrix} \right]=
264263\left[ \begin{matrix} y_0 \\ y_1 \end{matrix} \right] $$
265264:eqlabel:` equ:ch-deploy/conv-matmul-one-dimension `
@@ -271,17 +270,15 @@ multiplication. The matrix multiplication result may be obtained by
271270computing an intermediate variable $m_0-m_3$, as shown in Equation
272271:eqref:` ch-deploy/conv-2-winograd ` :
273272
274- $$
275- \textit{\textbf{F}}(2, 3)=
273+ $$ \textit{\textbf{F}}(2, 3)=
276274\left[ \begin{matrix} d_0 & d_1 & d_2 \\ d_1 & d_2 & d_3 \end{matrix} \right] \times \left[ \begin{matrix} g_0 \\ g_1 \\ g_2 \end{matrix} \right]=
277275\left[ \begin{matrix} m_0+m_1+m_2 \\ m_1-m_2+m_3 \end{matrix} \right] $$
278276:eqlabel:` equ:ch-deploy/conv-2-winograd `
279277
280278where $m_0-m_3$ are computed as Equation
281279:eqref:` ch-deploy/winograd-param ` :
282280
283- $$
284- \begin{aligned}
281+ $$ \begin{aligned}
285282m_0=(d_0-d_2) \times g_0 \\
286283m_1=(d_1+d_2) \times (\frac{g_0+g_1+g_2}{2}) \\
287284m_2=(d_0-d_2) \times (\frac{g_0-g_1+g_2}{2}) \\
@@ -310,22 +307,18 @@ matrix computation is performed based on the handwritten form, as
310307provided in Equation
311308:eqref:` ch-deploy/winograd-param ` .
312309
313- $$
314- \textit{\textbf{Y}}=\textit{\textbf{A}}^{\rm T}(\textit{\textbf{G}}g) \odot (\textit{\textbf{B}}^{\rm T}d) $$
310+ $$ \textit{\textbf{Y}}=\textit{\textbf{A}}^{\rm T}(\textit{\textbf{G}}g) \odot (\textit{\textbf{B}}^{\rm T}d) $$
315311:eqlabel:` equ:ch-deploy/winograd-matrix `
316312
317- $$
318- \textit{\textbf{B}}^{\rm T}=
313+ $$ \textit{\textbf{B}}^{\rm T}=
319314\left[ \begin{matrix} 1 & 0 & -1 & 0 \\ 0 & 1 & 1 & 0 \\ 0 & -1 & 1 & 0 \\ 0 & 1 & 0 & -1 \end{matrix} \right] $$
320315:eqlabel:` equ:ch-deploy/winograd-matrix-bt `
321316
322- $$
323- \textit{\textbf{G}}=
317+ $$ \textit{\textbf{G}}=
324318\left[ \begin{matrix} 1 & 0 & 0 \\ 0.5 & 0.5 & 0.5 \\ 0.5 & -0.5 & 0.5 \\ 0 & 0 & 1 \end{matrix} \right] $$
325319:eqlabel:` equ:ch-deploy/winograd-matrix-g `
326320
327- $$
328- \textit{\textbf{A}}^{\rm T}=
321+ $$ \textit{\textbf{A}}^{\rm T}=
329322\left[ \begin{matrix} 1 & 1 & -1 & 0 \\ 0 & 1 & -1 & -1 \end{matrix} \right] \\ $$
330323:eqlabel:` equ:ch-deploy/winograd-matrix-at `
331324
@@ -337,8 +330,7 @@ shown in Equation
337330Winograd has 16 multiplications, reducing the computation complexity by
3383312.25 times compared with 36 multiplications of the original convolution.
339332
340- $$
341- \textit{\textbf{Y}}=\textit{\textbf{A}}^{\rm T}(\textit{\textbf{G}}g\textit{\textbf{G}}^{\rm T}) \odot (\textit{\textbf{B}}^{\rm T}d\textit{\textbf{B}})\textit{\textbf{A}} $$
333+ $$ \textit{\textbf{Y}}=\textit{\textbf{A}}^{\rm T}(\textit{\textbf{G}}g\textit{\textbf{G}}^{\rm T}) \odot (\textit{\textbf{B}}^{\rm T}d\textit{\textbf{B}})\textit{\textbf{A}} $$
342334:eqlabel:` equ:ch-deploy/winograd-two-dimension-matrix `
343335
344336The logical process of Winograd can be divided into four steps, as shown
0 commit comments