Skip to content

Commit 8d81de3

Browse files
authored
Update Conversion_to_Inference_Model_and_Model_Optimization.md
Remove \label since it is unsupported in md. Replace \bm to \mathbf
1 parent 24019d8 commit 8d81de3

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

ch_model_deployment/Conversion_to_Inference_Model_and_Model_Optimization.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -95,41 +95,41 @@ Convolution is expressed as Equation
9595
[\[equ:ch-deploy/conv-equation\]](#equ:ch-deploy/conv-equation){reference-type="ref"
9696
reference="equ:ch-deploy/conv-equation"}.
9797

98-
$$\tag{equ:ch-deploy/conv-equation}
99-
\bm{Y_{\rm conv}}=\bm{W_{\rm conv}}\cdot\bm{X_{\rm conv}}+\bm{B_{\rm conv}}$$
98+
$$[equ:ch-deploy/conv-equation]
99+
\mathbf{Y_{\rm conv}}=\mathbf{W_{\rm conv}}\cdot\mathbf{X_{\rm conv}}+\mathbf{B_{\rm conv}}$$
100100

101101
Here, we do not need to understand what each variable means. Instead, we
102102
only need to keep in mind that Equation
103103
[\[equ:ch-deploy/conv-equation\]](#equ:ch-deploy/conv-equation){reference-type="ref"
104104
reference="equ:ch-deploy/conv-equation"} is an equation for
105-
$\bm{Y_{\rm conv}}$ with respect to $\bm{X_{\rm conv}}$, and other
105+
$\mathbf{Y_{\rm conv}}$ with respect to $\mathbf{X_{\rm conv}}$, and other
106106
symbols are constants.
107107

108108
Equation
109109
[\[equ:ch-deploy/bn-equation\]](#equ:ch-deploy/bn-equation){reference-type="ref"
110110
reference="equ:ch-deploy/bn-equation"} is about the computation of
111111
Batchnorm:
112112

113-
$$\tag{equ:ch-deploy/bn-equation}
114-
\bm{Y_{\rm bn}}=\gamma\frac{\bm{X_{\rm bn}}-\mu_{\mathcal{B}}}{\sqrt{{\sigma_{\mathcal{B}}}^{2}+\epsilon}}+\beta$$
113+
$$[equ:ch-deploy/bn-equation]:
114+
\mathbf{Y_{\rm bn}}=\gamma\frac{\mathbf{X_{\rm bn}}-\mu_{\mathcal{B}}}{\sqrt{{\sigma_{\mathcal{B}}}^{2}+\epsilon}}+\beta$$
115115

116-
Similarly, it is an equation for $\bm{Y_{\rm bn}}$ with respect to
117-
$\bm{X_{\rm bn}}$. Other symbols in the equation represent constants.
116+
Similarly, it is an equation for $\mathbf{Y_{\rm bn}}$ with respect to
117+
$\mathbf{X_{\rm bn}}$. Other symbols in the equation represent constants.
118118

119119
As shown in Figure
120120
[2](#fig:ch-deploy/conv-bn-fusion){reference-type="ref"
121121
reference="fig:ch-deploy/conv-bn-fusion"}, when the output of
122122
Convolution is used as the input of Batchnorm, the formula of Batchnorm
123-
is a function for $\bm{Y_{\rm bn}}$ with respect to $\bm{X_{\rm conv}}$.
124-
After substituting $\bm{Y_{\rm conv}}$ into $\bm{X_{\rm bn}}$ and
123+
is a function for $\mathbf{Y_{\rm bn}}$ with respect to $\mathbf{X_{\rm conv}}$.
124+
After substituting $\mathbf{Y_{\rm conv}}$ into $\mathbf{X_{\rm bn}}$ and
125125
uniting and extracting the constants, we obtain Equation
126126
[\[equ:ch-deploy/conv-bn-equation-3\]](#equ:ch-deploy/conv-bn-equation-3){reference-type="ref"
127127
reference="equ:ch-deploy/conv-bn-equation-3"}.
128128

129-
$$\tag{equ:ch-deploy/conv-bn-equation-3}
130-
\bm{Y_{\rm bn}}=\bm{A}\cdot\bm{X_{\rm conv}}+\bm{B}$$
129+
$$[equ:ch-deploy/conv-bn-equation-3]
130+
\mathbf{Y_{\rm bn}}=\mathbf{A}\cdot\mathbf{X_{\rm conv}}+\mathbf{B}$$
131131

132-
Here, $\bm{A}$ and $\bm{B}$ are two matrices. It can be noticed that
132+
Here, $\mathbf{A}$ and $\mathbf{B}$ are two matrices. It can be noticed that
133133
Equation
134134
[\[equ:ch-deploy/conv-bn-equation-3\]](#equ:ch-deploy/conv-bn-equation-3){reference-type="ref"
135135
reference="equ:ch-deploy/conv-bn-equation-3"} is a formula for computing
@@ -196,8 +196,8 @@ folding the constants, Batchnorm is defined as Equation
196196
[\[equ:ch-deploy/replace-scale\]](#equ:ch-deploy/replace-scale){reference-type="ref"
197197
reference="equ:ch-deploy/replace-scale"}
198198

199-
$$\tag{equ:ch-deploy/replace-scale}
200-
\bm{Y_{bn}}=scale\cdot\bm{X_{bn}}+offset$$
199+
$$[equ:ch-deploy/replace-scale]
200+
\mathbf{Y_{bn}}=scale\cdot\mathbf{X_{bn}}+offset$$
201201

202202
where **scale** and **offsets** are scalars. This simplified formula can
203203
be mapped to a Scale operator.

0 commit comments

Comments
 (0)