!18870 Fix the formula display problem and some other formatting problems

Merge pull request !18870 from dinglinhe/code_docs_dlh_ms_I3XSH3
This commit is contained in:
i-robot 2021-06-25 09:35:47 +00:00 committed by Gitee
commit 765c03e53f
10 changed files with 16 additions and 16 deletions

View File

@ -1260,7 +1260,7 @@ class GraphKernel(Cell):
flags (dict) : Set graph flags. Default: None. flags (dict) : Set graph flags. Default: None.
Supported Platforms: Supported Platforms:
``Ascend`` ``GPU`` ``Ascend`` ``GPU`` ``CPU``
Examples: Examples:
>>> class Relu(nn.GraphKernel): >>> class Relu(nn.GraphKernel):

View File

@ -124,7 +124,7 @@ class LogSoftmax(Cell):
ValueError: If `axis` is not in range [-len(x), len(x)). ValueError: If `axis` is not in range [-len(x), len(x)).
Supported Platforms: Supported Platforms:
``Ascend`` ``GPU`` ``Ascend`` ``GPU`` ``CPU``
Examples: Examples:
>>> x = Tensor(np.array([[-1.0, 4.0, -8.0], [2.0, -5.0, 9.0]]), mindspore.float32) >>> x = Tensor(np.array([[-1.0, 4.0, -8.0], [2.0, -5.0, 9.0]]), mindspore.float32)

View File

@ -250,7 +250,7 @@ class CellList(_CellListBase, Cell):
args (list, optional): List of subclass of Cell. args (list, optional): List of subclass of Cell.
Supported Platforms: Supported Platforms:
``Ascend`` ``GPU`` ``Ascend`` ``GPU`` ``CPU``
Examples: Examples:
>>> conv = nn.Conv2d(100, 20, 3) >>> conv = nn.Conv2d(100, 20, 3)

View File

@ -309,7 +309,7 @@ class BatchNorm1d(_BatchNorm):
Tensor, the normalized, scaled, offset tensor, of shape :math:`(N, C_{out})`. Tensor, the normalized, scaled, offset tensor, of shape :math:`(N, C_{out})`.
Supported Platforms: Supported Platforms:
``Ascend`` ``GPU`` ``Ascend`` ``GPU`` ``CPU``
Raises: Raises:
TypeError: If `num_features` is not an int. TypeError: If `num_features` is not an int.

View File

@ -333,7 +333,7 @@ class MAELoss(Loss):
``Ascend`` ``GPU`` ``CPU`` ``Ascend`` ``GPU`` ``CPU``
Examples: Examples:
# Case 1: logits.shape = labels.shape = (3,) >>> # Case 1: logits.shape = labels.shape = (3,)
>>> loss = nn.MAELoss() >>> loss = nn.MAELoss()
>>> logits = Tensor(np.array([1, 2, 3]), mindspore.float32) >>> logits = Tensor(np.array([1, 2, 3]), mindspore.float32)
>>> labels = Tensor(np.array([1, 2, 2]), mindspore.float32) >>> labels = Tensor(np.array([1, 2, 2]), mindspore.float32)

View File

@ -47,7 +47,7 @@ class OcclusionSensitivity(Metric):
Default: None. Default: None.
Supported Platforms: Supported Platforms:
``Ascend`` ``GPU`` ``Ascend`` ``GPU`` ``CPU``
Example: Example:
>>> import numpy as np >>> import numpy as np

View File

@ -287,7 +287,7 @@ class Adam(Optimizer):
ValueError: If `weight_decay` is less than 0. ValueError: If `weight_decay` is less than 0.
Supported Platforms: Supported Platforms:
``Ascend`` ``GPU`` ``Ascend`` ``GPU`` ``CPU``
Examples: Examples:
>>> net = Net() >>> net = Net()
@ -430,7 +430,7 @@ class AdamWeightDecay(Optimizer):
ValueError: If `weight_decay` is less than 0. ValueError: If `weight_decay` is less than 0.
Supported Platforms: Supported Platforms:
``Ascend`` ``GPU`` ``Ascend`` ``GPU`` ``CPU``
Examples: Examples:
>>> net = Net() >>> net = Net()

View File

@ -91,7 +91,7 @@ class LARS(Optimizer):
Union[Tensor[bool], tuple[Parameter]], it depends on the output of `optimizer`. Union[Tensor[bool], tuple[Parameter]], it depends on the output of `optimizer`.
Supported Platforms: Supported Platforms:
``Ascend`` ``Ascend`` ``CPU``
Examples: Examples:
>>> net = Net() >>> net = Net()

View File

@ -110,7 +110,7 @@ class SGD(Optimizer):
ValueError: If the momentum, dampening or weight_decay value is less than 0.0. ValueError: If the momentum, dampening or weight_decay value is less than 0.0.
Supported Platforms: Supported Platforms:
``Ascend`` ``GPU`` ``Ascend`` ``GPU`` ``CPU``
Examples: Examples:
>>> net = Net() >>> net = Net()

View File

@ -1165,7 +1165,7 @@ class Neg(PrimitiveWithInfer):
Inputs: Inputs:
- **x** (Tensor) - The input tensor whose dtype is number. - **x** (Tensor) - The input tensor whose dtype is number.
:math:`(N,*)` where :math:`*` means ,any number of additional dimensions, its rank should less than 8. :math:`(N,*)` where :math:`*` means ,any number of additional dimensions, its rank should less than 8.
Outputs: Outputs:
Tensor, has the same shape and dtype as input. Tensor, has the same shape and dtype as input.
@ -1581,7 +1581,7 @@ class Sqrt(PrimitiveWithCheck):
Inputs: Inputs:
- **x** (Tensor) - The input tensor whose dtype is number. - **x** (Tensor) - The input tensor whose dtype is number.
:math:`(N,*)` where :math:`*` means ,any number of additional dimensions, its rank should less than 8. :math:`(N,*)` where :math:`*` means ,any number of additional dimensions, its rank should less than 8.
Outputs: Outputs:
Tensor, has the same shape and data type as the `x`. Tensor, has the same shape and data type as the `x`.
@ -2345,7 +2345,7 @@ class FloorDiv(_MathBinaryOp):
.. math:: .. math::
out_{i} = \text{floor}( \frac{x_i}{y_i}) out_{i} = \\text{floor}( \\frac{x_i}{y_i})
where the :math:`floor` indicates the operator that converts the input data into the floor data type. where the :math:`floor` indicates the operator that converts the input data into the floor data type.
@ -3294,11 +3294,11 @@ class LogicalNot(PrimitiveWithInfer):
.. math:: .. math::
out_{i} = \neg x_{i} out_{i} = \\neg x_{i}
Inputs: Inputs:
- **x** (Tensor) - The input tensor whose dtype is bool. - **x** (Tensor) - The input tensor whose dtype is bool.
:math:`(N,*)` where :math:`*` means,any number of additional dimensions. :math:`(N,*)` where :math:`*` means,any number of additional dimensions.
Outputs: Outputs:
Tensor, the shape is the same as the `x`, and the dtype is bool. Tensor, the shape is the same as the `x`, and the dtype is bool.
@ -3399,7 +3399,7 @@ class LogicalOr(_LogicBinaryOp):
.. math:: .. math::
out_{i} = x_{i} \vee y_{i} out_{i} = x_{i} \\vee y_{i}
Inputs: Inputs:
- **x** (Union[Tensor, bool]) - The first input is a bool or a tensor whose data type is bool. - **x** (Union[Tensor, bool]) - The first input is a bool or a tensor whose data type is bool.