3.4.3. 实例¶
.. math::
(a + b)^2 = a^2 + 2ab + b^2
(a - b)^2 = a^2 - 2ab + b^2
\[(a + b)^2 = a^2 + 2ab + b^2
(a - b)^2 = a^2 - 2ab + b^2\]
.. math::
\begin{array}{ll}
r_t = \mathrm{sigmoid}(W_{ir} x_t + b_{ir} + W_{hr} h_{(t-1)} + b_{hr}) \\
z_t = \mathrm{sigmoid}(W_{iz} x_t + b_{iz} + W_{hz} h_{(t-1)} + b_{hz}) \\
n_t = \tanh(W_{in} x_t + b_{in} + r_t * (W_{hn} h_{(t-1)}+ b_{hn})) \\
h_t = (1 - z_t) * n_t + z_t * h_{(t-1)} \\
\end{array}
说明:
\mathrm 是一个命令,用于将文本设置为罗马字体(即直体),而不是默认的斜体。这通常用于数学公式中的变量名以外的文本,比如函数名、常量名等,以区分它们和变量。
\[\begin{split}\begin{array}{ll}
r_t = \mathrm{sigmoid}(W_{ir} x_t + b_{ir} + W_{hr} h_{(t-1)} + b_{hr}) \\
z_t = \mathrm{sigmoid}(W_{iz} x_t + b_{iz} + W_{hz} h_{(t-1)} + b_{hz}) \\
n_t = \tanh(W_{in} x_t + b_{in} + r_t * (W_{hn} h_{(t-1)}+ b_{hn})) \\
h_t = (1 - z_t) * n_t + z_t * h_{(t-1)} \\
\end{array}\end{split}\]
:math:`$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$`
:math:`\frac{1}{\sqrt{x^2 + 1}}`
:math:`\begin{array}{cc} a & b \\ c & d \end{array}`
:math:`\min\limits_{w} \frac{1}{2^k} = 1`
\($$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$\)
\(\frac{1}{\sqrt{x^2 + 1}}\)
\(\begin{array}{cc} a & b \\ c & d \end{array}\)
\(\min\limits_{w} \frac{1}{2^k} = 1\)
* 左右括号: :math:`\left( {\rm A}^{\rm T}\right)^{\rm T} = {\rm A}`
* :math:`{\rm A}^p = {\rm S} \Lambda^p {\rm S}^{-1}`
.. math::
\text{A} = \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{pmatrix}
左右括号: \(\left( {\rm A}^{\rm T}\right)^{\rm T} = {\rm A}\)
\({\rm A}^p = {\rm S} \Lambda^p {\rm S}^{-1}\)
\[\begin{split}\text{A} = \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{pmatrix}\end{split}\]
:math:`\binom{10}{6} \theta^6 (1-\theta)^4`
:math:`\frac{dL(\theta|D)}{d\theta} = 6\binom{10}{6} \theta^5 (1-\theta)^3 - 4\binom{10}{6} \theta^6 (1-\theta)^2 = 0`
\(\binom{10}{6} \theta^6 (1-\theta)^4\)
\(\frac{dL(\theta|D)}{d\theta} = 6\binom{10}{6} \theta^5 (1-\theta)^3 - 4\binom{10}{6} \theta^6 (1-\theta)^2 = 0\)