Fix the formula display problem and some other formatting problems

This commit is contained in:
dinglinhe 2021-06-25 15:29:34 +08:00
parent f838dd5837
commit db77849d85
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.
Supported Platforms:
``Ascend`` ``GPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> class Relu(nn.GraphKernel):

View File

@ -124,7 +124,7 @@ class LogSoftmax(Cell):
ValueError: If `axis` is not in range [-len(x), len(x)).
Supported Platforms:
``Ascend`` ``GPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> 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.
Supported Platforms:
``Ascend`` ``GPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> 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})`.
Supported Platforms:
``Ascend`` ``GPU``
``Ascend`` ``GPU`` ``CPU``
Raises:
TypeError: If `num_features` is not an int.

View File

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

View File

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

View File

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

View File

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

View File

@ -1165,7 +1165,7 @@ class Neg(PrimitiveWithInfer):
Inputs:
- **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:
Tensor, has the same shape and dtype as input.
@ -1581,7 +1581,7 @@ class Sqrt(PrimitiveWithCheck):
Inputs:
- **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:
Tensor, has the same shape and data type as the `x`.
@ -2345,7 +2345,7 @@ class FloorDiv(_MathBinaryOp):
.. 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.
@ -3294,11 +3294,11 @@ class LogicalNot(PrimitiveWithInfer):
.. math::
out_{i} = \neg x_{i}
out_{i} = \\neg x_{i}
Inputs:
- **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:
Tensor, the shape is the same as the `x`, and the dtype is bool.
@ -3399,7 +3399,7 @@ class LogicalOr(_LogicBinaryOp):
.. math::
out_{i} = x_{i} \vee y_{i}
out_{i} = x_{i} \\vee y_{i}
Inputs:
- **x** (Union[Tensor, bool]) - The first input is a bool or a tensor whose data type is bool.