!47287 modify format

Merge pull request !47287 from 俞涵/code_docs_2.0.0al
This commit is contained in:
i-robot 2022-12-28 06:46:15 +00:00 committed by Gitee
commit fc32f077a7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
9 changed files with 9 additions and 9 deletions

View File

@ -12,7 +12,7 @@ mindspore.nn.Conv2d
\sum_{k = 0}^{C_{in} - 1} \text{ccor}({\text{weight}(C_{\text{out}_j}, k), \text{X}(N_i, k)})
其中,:math:`ccor``cross-correlation <https://en.wikipedia.org/wiki/Cross-correlation>`_ :math:`C_{in}` 为输入空间维度, :math:`out_{j}` 对应输出的第 :math:`j` 个空间维度,:math:`j` 的范围在 :math:`[0C_{out}-1]` 内。
:math:`\text{weight}(C_{\text{out}_j}, k)`是shape为 :math:`(\text{kernel_size[0]}, \text{kernel_size[1]})` 的卷积核切片,其中 :math:`\text{kernel_size[0]}`:math:`\text{kernel_size[1]}` 分别是卷积核的高度和宽度。 :math:`\text{bias}` 为偏置参数, :math:`\text{X}` 为输入Tensor。
:math:`\text{weight}(C_{\text{out}_j}, k)` 是shape为 :math:`(\text{kernel_size[0]}, \text{kernel_size[1]})` 的卷积核切片,其中 :math:`\text{kernel_size[0]}`:math:`\text{kernel_size[1]}` 分别是卷积核的高度和宽度。 :math:`\text{bias}` 为偏置参数, :math:`\text{X}` 为输入Tensor。
此时输入Tensor对应的 `data_format` 为"NCHW"完整卷积核的shape为 :math:`(C_{out}, C_{in} / \text{group}, \text{kernel_size[0]}, \text{kernel_size[1]})` ,其中 `group` 是在空间维度上分割输入 `x` 的组数。如果输入Tensor对应的 `data_format` 为"NHWC"完整卷积核的shape则为 :math:`(C_{out}, \text{kernel_size[0]}, \text{kernel_size[1]}), C_{in} / \text{group}`
详细介绍请参考论文 `Gradient Based Learning Applied to Document Recognition <http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf>`_

View File

@ -26,7 +26,7 @@ mindspore.nn.LPPool1d
- **x** (Tensor) - shape为 :math:`(N, C_{in}, L_{in})`:math:`(C, L_{in})` 的Tensor。
输出:
- **output** - LPPool1d的计算结果shape为 :math:`(N, C_{out}, L_{out})`:math:`(C, L_{in})`的Tensor与输入 `x` 的类型一致。
- **output** - LPPool1d的计算结果shape为 :math:`(N, C_{out}, L_{out})`:math:`(C, L_{in})` 的Tensor与输入 `x` 的类型一致。
异常:
- **TypeError** - `x` 不是Tensor。

View File

@ -26,7 +26,7 @@ mindspore.nn.LPPool2d
- **x** (Tensor) - shape为 :math:`(N, C, H_{in}, W_{in})` 的Tensor。
输出:
- **output** - LPPool2d的计算结果shape为 :math:`(N, C, H_{in}, W_{in})`的Tensor与 输入 `x` 的类型一致。
- **output** - LPPool2d的计算结果shape为 :math:`(N, C, H_{in}, W_{in})` 的Tensor与 输入 `x` 的类型一致。
异常:
- **TypeError** - `x` 不是Tensor。

View File

@ -12,7 +12,7 @@ mindspore.nn.RNN
.. math::
h_t = activation(W_{ih} x_t + b_{ih} + W_{hh} h_{(t-1)} + b_{hh})
这里的 :math:`h_t` 是在 `t` 时刻的隐藏状态, :math:`x_t`是在 `t` 时刻的输入, :math:`h_{(t-1)}` 是上一层在 :math:`t-1` 时刻的隐藏状态,或初始隐藏状态。如果 `nonlinearity` 是'relu',则使用 :math:`\text{relu}` 而不是 :math:`\tanh`
这里的 :math:`h_t` 是在 `t` 时刻的隐藏状态, :math:`x_t` 是在 `t` 时刻的输入, :math:`h_{(t-1)}` 是上一层在 :math:`t-1` 时刻的隐藏状态,或初始隐藏状态。如果 `nonlinearity` 是'relu',则使用 :math:`\text{relu}` 而不是 :math:`\tanh`
参数:
- **input_size** (int) - 输入层输入的特征向量维度。

View File

@ -20,7 +20,7 @@
其中 :math:`w` 代表 `var` :math:`w` 将更新。
:math:`g_{t+1}` 代表 `mean_gradient` :math:`g_{t}` 是上一步的 :math:`g_{t+1}`
:math:`s_{t+1}` 代表 `mean_square` :math:`s_{t}` 是上一步的 :math:`s_{t+1}`
:math:`m_{t+1}`代表 `moment` :math:`m_{t}` 是上一步的 :math:`m_{t+1}`
:math:`m_{t+1}` 代表 `moment` :math:`m_{t}` 是上一步的 :math:`m_{t+1}`
:math:`\rho` 代表 `decay`:math:`\beta` 是动量,代表 `momentum`
:math:`\epsilon` 是一个添加在分母上的较小值,以避免被零除,表示 `epsilon`
:math:`\eta` 代表 `learning_rate`:math:`\nabla Q_{i}(w)` 代表 `grad`

View File

@ -24,7 +24,7 @@ mindspore.ops.lp_pool1d
- **ceil_mode** (bool) - 若为True使用ceil来计算输出shape。若为False使用floor来计算输出shape。默认值False。
返回:
- **output** - LPPool1d的计算结果shape为 :math:`(N, C_{out}, L_{out})`:math:`(C, L_{in})`的Tensor与 输入 `x` 的类型一致。
- **output** - LPPool1d的计算结果shape为 :math:`(N, C_{out}, L_{out})`:math:`(C, L_{in})` 的Tensor与 输入 `x` 的类型一致。
异常:
- **TypeError** - `x` 不是Tensor。

View File

@ -24,7 +24,7 @@ mindspore.ops.lp_pool2d
- **ceil_mode** (bool) - 若为True使用ceil模式来计算输出shape。若为False使用floor模式来计算输出shape。默认值False。
返回:
- **output** - LPPool2d的计算结果shape为 :math:`(N, C, H_{in}, W_{in})`的Tensor与 输入 `x` 的类型一致。
- **output** - LPPool2d的计算结果shape为 :math:`(N, C, H_{in}, W_{in})` 的Tensor与 输入 `x` 的类型一致。
异常:
- **TypeError** - `x` 不是Tensor。

View File

@ -9,7 +9,7 @@ mindspore.ops.orgqr
.. math::
H_{1} H_{2} \ldots H_{k} \quad \text { with } \quad H_{j}=\mathrm{I}_{M}-\tau_{j} w_{j} w_{j}^{\mathrm{H}}
其中:math:`\mathrm{I}_{M}`:math:`M` 维单位矩阵。当 :math:`w` 是复数的时候,:math:`w^{\mathrm{H}}` 是共轭转置否则是一般转置。输出矩阵的shape与输入矩阵 `x` 相同。
其中 :math:`\mathrm{I}_{M}` :math:`M` 维单位矩阵。当 :math:`w` 是复数的时候,:math:`w^{\mathrm{H}}` 是共轭转置否则是一般转置。输出矩阵的shape与输入矩阵 `x` 相同。
参数:
- **x** (Tensor) - shape :math:`(*, M, N)` 的Tensor表示2维或者3维矩阵。数据类型为float32、float64、complex64或者complex128。

View File

@ -296,7 +296,7 @@ class LambApplyWeightAssign(PrimitiveWithInfer):
- **w_norm** (Tensor) - :math:`\left \| w \right \|` in the updating formula, float32/float16.
- **g_norm** (Tensor) - :math:`\left \| r \right \|` in the updating formula, has the same type as `w_norm`.
- **lr** (Tensor) - :math:`l` in the updating formula, the learning rate, float32/float16.
- **update** (Tensor) -:math:`r + \lambda * w`in the updating formula, float32/float16.
- **update** (Tensor) - :math:`r + \lambda * w` in the updating formula, float32/float16.
- **var** (Tensor) - Weights to be updated, the same shape and type as `update`.
Outputs: