Merge pull request !47985 from 李林杰/code_docs_0117_fix_docs
This commit is contained in:
i-robot 2023-01-17 09:32:08 +00:00 committed by Gitee
commit ee745e9eca
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
11 changed files with 18 additions and 21 deletions

View File

@ -40,7 +40,7 @@ mindspore.nn.SmoothL1Loss
- **labels** (Tensor) - 目标值数据类型和shape与 `logits` 相同的Tensor。
输出:
Tensor。如果 `reduction` 为'none'则输出为Tensor且与 `logits` 的shape相同。否则shape为 `(1,)`
Tensor。如果 `reduction` 为'none'则输出为Tensor且与 `logits` 的shape相同。否则shape为 `()`
异常:
- **TypeError** - `beta` 不是float。

View File

@ -371,12 +371,9 @@ class MaxPool2d(_PoolNd):
pad_mode (str): The optional value for pad mode, is "same" or "valid", not case sensitive.
Default: "valid".
- same: Adopts the way of completion. The height and width of the output will be the same as
the input. The total number of padding will be calculated in horizontal and vertical
directions and evenly distributed to top and bottom, left and right if possible.
Otherwise, the last extra padding will be done from the bottom and the right side.
- same: The output shape is the same as the input shape evenly divided by `stride`.
- valid: Adopts the way of discarding. The possible largest height and width of output
- valid: The possible largest height and width of output
will be returned without padding. Extra pixels will be discarded.
data_format (str): The optional value for data format, is 'NHWC' or 'NCHW'.
Default: 'NCHW'.

View File

@ -578,7 +578,7 @@ class SmoothL1Loss(LossBase):
Outputs:
Tensor, if `reduction` is 'none', then output is a tensor with the same shape as `logits`.
Otherwise the shape of output tensor is `(1,)`.
Otherwise the shape of output tensor is `()`.
Raises:
TypeError: If `beta` is not a float.

View File

@ -50,7 +50,7 @@ class Laplace(Distribution):
TypeError: When the input `dtype` is not a subclass of float.
Supported Platforms:
``CPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> import mindspore

View File

@ -3366,7 +3366,7 @@ def nonzero(x):
ValueError: If 'x' dim equal to 0.
Supported Platforms:
``GPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> import mindspore

View File

@ -1598,7 +1598,7 @@ def xlogy(x, y):
ValueError: If `x` could not be broadcast to a tensor with shape of `y`.
Supported Platforms:
``Ascend`` ``CPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> x = Tensor(np.array([-5, 0, 4]), mindspore.float32)
@ -2709,7 +2709,7 @@ def trunc(input):
TypeError: If `input` is not a Tensor.
Supported Platforms:
``GPU`` ``CPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> x = Tensor(np.array([3.4742, 0.5466, -0.8008, -3.9079]),mindspore.float32)
@ -4155,7 +4155,7 @@ def lcm(x1, x2):
ValueError: If shape of two inputs are not broadcastable.
Supported Platforms:
``Ascend`` ``CPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> x1 = Tensor(np.array([7, 8, 9]))
@ -4230,7 +4230,7 @@ def gcd(x1, x2):
ValueError: If shape of two inputs are not broadcastable.
Supported Platforms:
``Ascend`` ``CPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> x1 = Tensor(np.array([7, 8, 9]))

View File

@ -120,7 +120,7 @@ def bartlett_window(window_length, periodic=True, *, dtype=None):
ValueError: If the dimension of `window_length` is not 0.
Supported Platforms:
``GPU``
``GPU`` ``CPU``
Examples:
>>> window_length = Tensor(5, mstype.int32)

View File

@ -72,7 +72,7 @@ class Svd(Primitive):
Refer to :func:`mindspore.ops.svd` for more details.
Supported Platforms:
``GPU``
``GPU`` ``CPU``
Examples:
>>> import numpy as np

View File

@ -3843,7 +3843,7 @@ class ApproximateEqual(_LogicBinaryOp):
but data type conversion of Parameter is not supported.
Supported Platforms:
``Ascend`` ``GPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> x = Tensor(np.array([1, 2, 3]), mindspore.float32)
@ -5956,7 +5956,7 @@ class Trunc(Primitive):
Refer to :func:`mindspore.ops.trunc` for more details.
Supported Platforms:
``GPU`` ``CPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> x = Tensor(np.array([3.4742, 0.5466, -0.8008, -3.9079]), mindspore.float32)
@ -6670,7 +6670,7 @@ class Trace(Primitive):
ValueError: If the dimension of `x` is not equal to 2.
Supported Platforms:
``CPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> x = Tensor(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), mindspore.float32)
@ -7127,7 +7127,7 @@ class FFTWithSize(Primitive):
ValueError: If norm is none of "backward", "forward" or "ortho".
Supported Platforms:
``CPU``
``GPU`` ``CPU``
Examples:
>>> # case FFT: signal_ndim: 1, inverse: False, real: False.

View File

@ -7630,7 +7630,7 @@ class AvgPool3D(Primitive):
ValueError: If `data_format` is not 'NCDHW'.
Supported Platforms:
``Ascend`` ``CPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> x = Tensor(np.arange(1 * 2 * 2 * 2 * 3).reshape((1, 2, 2, 2, 3)), mindspore.float16)

View File

@ -26,7 +26,7 @@ class BartlettWindow(Primitive):
Refer to :func:`mindspore.ops.bartlett_window` for more details.
Supported Platforms:
``GPU``
``GPU`` ``CPU``
Examples:
>>> window_length = Tensor(5, mstype.int32)