forked from mindspore-Ecosystem/mindspore
!47985 fix docs
Merge pull request !47985 from 李林杰/code_docs_0117_fix_docs
This commit is contained in:
commit
ee745e9eca
|
@ -40,7 +40,7 @@ mindspore.nn.SmoothL1Loss
|
||||||
- **labels** (Tensor) - 目标值,数据类型和shape与 `logits` 相同的Tensor。
|
- **labels** (Tensor) - 目标值,数据类型和shape与 `logits` 相同的Tensor。
|
||||||
|
|
||||||
输出:
|
输出:
|
||||||
Tensor。如果 `reduction` 为'none',则输出为Tensor且与 `logits` 的shape相同。否则shape为 `(1,)`。
|
Tensor。如果 `reduction` 为'none',则输出为Tensor且与 `logits` 的shape相同。否则shape为 `()`。
|
||||||
|
|
||||||
异常:
|
异常:
|
||||||
- **TypeError** - `beta` 不是float。
|
- **TypeError** - `beta` 不是float。
|
||||||
|
|
|
@ -371,12 +371,9 @@ class MaxPool2d(_PoolNd):
|
||||||
pad_mode (str): The optional value for pad mode, is "same" or "valid", not case sensitive.
|
pad_mode (str): The optional value for pad mode, is "same" or "valid", not case sensitive.
|
||||||
Default: "valid".
|
Default: "valid".
|
||||||
|
|
||||||
- same: Adopts the way of completion. The height and width of the output will be the same as
|
- same: The output shape is the same as the input shape evenly divided by `stride`.
|
||||||
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.
|
|
||||||
|
|
||||||
- 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.
|
will be returned without padding. Extra pixels will be discarded.
|
||||||
data_format (str): The optional value for data format, is 'NHWC' or 'NCHW'.
|
data_format (str): The optional value for data format, is 'NHWC' or 'NCHW'.
|
||||||
Default: 'NCHW'.
|
Default: 'NCHW'.
|
||||||
|
|
|
@ -578,7 +578,7 @@ class SmoothL1Loss(LossBase):
|
||||||
|
|
||||||
Outputs:
|
Outputs:
|
||||||
Tensor, if `reduction` is 'none', then output is a tensor with the same shape as `logits`.
|
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:
|
Raises:
|
||||||
TypeError: If `beta` is not a float.
|
TypeError: If `beta` is not a float.
|
||||||
|
|
|
@ -50,7 +50,7 @@ class Laplace(Distribution):
|
||||||
TypeError: When the input `dtype` is not a subclass of float.
|
TypeError: When the input `dtype` is not a subclass of float.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``CPU``
|
``Ascend`` ``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> import mindspore
|
>>> import mindspore
|
||||||
|
|
|
@ -3366,7 +3366,7 @@ def nonzero(x):
|
||||||
ValueError: If 'x' dim equal to 0.
|
ValueError: If 'x' dim equal to 0.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``GPU``
|
``Ascend`` ``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> import mindspore
|
>>> import mindspore
|
||||||
|
|
|
@ -1598,7 +1598,7 @@ def xlogy(x, y):
|
||||||
ValueError: If `x` could not be broadcast to a tensor with shape of `y`.
|
ValueError: If `x` could not be broadcast to a tensor with shape of `y`.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``Ascend`` ``CPU``
|
``Ascend`` ``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> x = Tensor(np.array([-5, 0, 4]), mindspore.float32)
|
>>> x = Tensor(np.array([-5, 0, 4]), mindspore.float32)
|
||||||
|
@ -2709,7 +2709,7 @@ def trunc(input):
|
||||||
TypeError: If `input` is not a Tensor.
|
TypeError: If `input` is not a Tensor.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``GPU`` ``CPU``
|
``Ascend`` ``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> x = Tensor(np.array([3.4742, 0.5466, -0.8008, -3.9079]),mindspore.float32)
|
>>> 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.
|
ValueError: If shape of two inputs are not broadcastable.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``Ascend`` ``CPU``
|
``Ascend`` ``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> x1 = Tensor(np.array([7, 8, 9]))
|
>>> x1 = Tensor(np.array([7, 8, 9]))
|
||||||
|
@ -4230,7 +4230,7 @@ def gcd(x1, x2):
|
||||||
ValueError: If shape of two inputs are not broadcastable.
|
ValueError: If shape of two inputs are not broadcastable.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``Ascend`` ``CPU``
|
``Ascend`` ``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> x1 = Tensor(np.array([7, 8, 9]))
|
>>> x1 = Tensor(np.array([7, 8, 9]))
|
||||||
|
|
|
@ -120,7 +120,7 @@ def bartlett_window(window_length, periodic=True, *, dtype=None):
|
||||||
ValueError: If the dimension of `window_length` is not 0.
|
ValueError: If the dimension of `window_length` is not 0.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``GPU``
|
``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> window_length = Tensor(5, mstype.int32)
|
>>> window_length = Tensor(5, mstype.int32)
|
||||||
|
|
|
@ -72,7 +72,7 @@ class Svd(Primitive):
|
||||||
Refer to :func:`mindspore.ops.svd` for more details.
|
Refer to :func:`mindspore.ops.svd` for more details.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``GPU``
|
``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> import numpy as np
|
>>> import numpy as np
|
||||||
|
|
|
@ -3843,7 +3843,7 @@ class ApproximateEqual(_LogicBinaryOp):
|
||||||
but data type conversion of Parameter is not supported.
|
but data type conversion of Parameter is not supported.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``Ascend`` ``GPU``
|
``Ascend`` ``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> x = Tensor(np.array([1, 2, 3]), mindspore.float32)
|
>>> 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.
|
Refer to :func:`mindspore.ops.trunc` for more details.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``GPU`` ``CPU``
|
``Ascend`` ``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> x = Tensor(np.array([3.4742, 0.5466, -0.8008, -3.9079]), mindspore.float32)
|
>>> 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.
|
ValueError: If the dimension of `x` is not equal to 2.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``CPU``
|
``Ascend`` ``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> x = Tensor(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), mindspore.float32)
|
>>> 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".
|
ValueError: If norm is none of "backward", "forward" or "ortho".
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``CPU``
|
``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> # case FFT: signal_ndim: 1, inverse: False, real: False.
|
>>> # case FFT: signal_ndim: 1, inverse: False, real: False.
|
||||||
|
|
|
@ -7630,7 +7630,7 @@ class AvgPool3D(Primitive):
|
||||||
ValueError: If `data_format` is not 'NCDHW'.
|
ValueError: If `data_format` is not 'NCDHW'.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``Ascend`` ``CPU``
|
``Ascend`` ``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> x = Tensor(np.arange(1 * 2 * 2 * 2 * 3).reshape((1, 2, 2, 2, 3)), mindspore.float16)
|
>>> x = Tensor(np.arange(1 * 2 * 2 * 2 * 3).reshape((1, 2, 2, 2, 3)), mindspore.float16)
|
||||||
|
|
|
@ -26,7 +26,7 @@ class BartlettWindow(Primitive):
|
||||||
Refer to :func:`mindspore.ops.bartlett_window` for more details.
|
Refer to :func:`mindspore.ops.bartlett_window` for more details.
|
||||||
|
|
||||||
Supported Platforms:
|
Supported Platforms:
|
||||||
``GPU``
|
``GPU`` ``CPU``
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> window_length = Tensor(5, mstype.int32)
|
>>> window_length = Tensor(5, mstype.int32)
|
||||||
|
|
Loading…
Reference in New Issue