diff --git a/mindspore/nn/cell.py b/mindspore/nn/cell.py index 9e2da36298..2046eba6e0 100755 --- a/mindspore/nn/cell.py +++ b/mindspore/nn/cell.py @@ -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): diff --git a/mindspore/nn/layer/activation.py b/mindspore/nn/layer/activation.py index 61dda3f5f1..c9aa72988b 100644 --- a/mindspore/nn/layer/activation.py +++ b/mindspore/nn/layer/activation.py @@ -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) diff --git a/mindspore/nn/layer/container.py b/mindspore/nn/layer/container.py index 625fd545c3..4973dab1c8 100644 --- a/mindspore/nn/layer/container.py +++ b/mindspore/nn/layer/container.py @@ -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) diff --git a/mindspore/nn/layer/normalization.py b/mindspore/nn/layer/normalization.py index 97c099be4f..7cec3a4969 100644 --- a/mindspore/nn/layer/normalization.py +++ b/mindspore/nn/layer/normalization.py @@ -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. diff --git a/mindspore/nn/loss/loss.py b/mindspore/nn/loss/loss.py index a0551aa662..036d09637b 100644 --- a/mindspore/nn/loss/loss.py +++ b/mindspore/nn/loss/loss.py @@ -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) diff --git a/mindspore/nn/metrics/occlusion_sensitivity.py b/mindspore/nn/metrics/occlusion_sensitivity.py index a5e9e8debc..3af9527a13 100644 --- a/mindspore/nn/metrics/occlusion_sensitivity.py +++ b/mindspore/nn/metrics/occlusion_sensitivity.py @@ -47,7 +47,7 @@ class OcclusionSensitivity(Metric): Default: None. Supported Platforms: - ``Ascend`` ``GPU`` + ``Ascend`` ``GPU`` ``CPU`` Example: >>> import numpy as np diff --git a/mindspore/nn/optim/adam.py b/mindspore/nn/optim/adam.py index 1699e01a73..ab6913f9c7 100755 --- a/mindspore/nn/optim/adam.py +++ b/mindspore/nn/optim/adam.py @@ -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() diff --git a/mindspore/nn/optim/lars.py b/mindspore/nn/optim/lars.py index 2f64a0650f..fbd8a8c484 100755 --- a/mindspore/nn/optim/lars.py +++ b/mindspore/nn/optim/lars.py @@ -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() diff --git a/mindspore/nn/optim/sgd.py b/mindspore/nn/optim/sgd.py index 46beb91920..d1e92f41ff 100755 --- a/mindspore/nn/optim/sgd.py +++ b/mindspore/nn/optim/sgd.py @@ -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() diff --git a/mindspore/ops/operations/math_ops.py b/mindspore/ops/operations/math_ops.py index 4ea4a24eea..91c098c55f 100644 --- a/mindspore/ops/operations/math_ops.py +++ b/mindspore/ops/operations/math_ops.py @@ -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.