!40453 correct the errors on webpage

Merge pull request !40453 from 宦晓玲/code_docs_0816
This commit is contained in:
i-robot 2022-08-16 09:30:20 +00:00 committed by Gitee
commit 39c5bf5d3a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
14 changed files with 39 additions and 35 deletions

View File

@ -16,7 +16,7 @@ mindspore.COOTensor
[0, 0, 0, 0]]
.. note::
这是一个实验特性在未来可能会发生API的变化。目前COOTensor中相同索引的值不会进行合并。
这是一个实验特性在未来可能会发生API的变化。目前COOTensor中相同索引的值不会进行合并。如果索引中包含界外值,则得出未定义结果。
参数:
- **indices** (Tensor) - 形状为 `[N, ndims]` 的二维整数张量其中N和ndims分别表示稀疏张量中 `values` 的数量和COOTensor维度的数量。目前 `ndims` 只能为2。请确保indices的值在所给shape范围内。

View File

@ -10,9 +10,6 @@
.. math::
(x_1, x_2, ..., \sum_{i=1}^Nx_{mi}, ..., x_R)
.. note::
`axis` 的取值范围为 :math:`[-dims, dims - 1]``dims``input_x` 的维度长度。
参数:
- **input_x** (tuple, list) - 输入为Tensor组成的tuple或list。假设在这个tuple或list中有两个Tensor`x1``x2` 。要在0轴方向上执行 `Concat` 除0轴外其他轴的shape都应相等:math:`x1.shape[1] = x2.shape[1]x1.shape[2] = x2.shape[2]...x1.shape[R] = x2.shape[R]` ,其中 :math:`R` 表示最后一个轴。
- **axis** (int) - 表示指定的轴,取值范围是 :math:`[-R, R)` 。默认值0。

View File

@ -16,7 +16,7 @@ mindspore.ops.log_softmax
- **logits** (Tensor) - shape :math:`(N, *)` ,其中 :math:`*` 表示任意数量的附加维度其数据类型为float16或float32。
- **axis** (int) - 指定进行运算的轴。默认值:-1。
输出
返回
Tensor数据类型和shape与 `logits` 相同。
异常:

View File

@ -1,7 +1,7 @@
mindspore.ops.softmax
=====================
.. py::: function.ops.softmax(x, axis=-1)
.. py:function:: mindspore.ops.softmax(x, axis=-1)
Softmax函数。

View File

@ -686,7 +686,7 @@ def get_auto_offload():
Returns:
bool, Whether the automatic offload feature is enabled.
Example:
Examples:
>>> # Get the global configuration of the automatic offload feature.
>>> auto_offload = ds.config.get_auto_offload()
"""

View File

@ -1061,7 +1061,8 @@ def slice(input_x, begin, size):
The slice `begin` represents the offset in each dimension of `input_x`,
The slice `size` represents the size of the output tensor.
Note that `begin` is zero-based and `size` is one-based.
Note:
`begin` is zero-based and `size` is one-based.
If `size[i]` is -1, all remaining elements in dimension i are included in the slice.
This is equivalent to setting :math:`size[i] = input_x.shape(i) - begin[i]`.

View File

@ -2662,11 +2662,6 @@ def equal(x, y):
r"""
Computes the equivalence between two tensors element-wise.
Inputs of `x` and `y` comply with the implicit type conversion rules to make the data types consistent.
The inputs must be two tensors or one tensor and one scalar.
When the inputs are two tensors, the shapes of them could be broadcast.
When the inputs are one tensor and one scalar, the scalar could only be a constant.
.. math::
out_{i} =\begin{cases}
@ -2674,6 +2669,12 @@ def equal(x, y):
& \text{False, if } x_{i} \ne y_{i}
\end{cases}
Note:
- Inputs of `x` and `y` comply with the implicit type conversion rules to make the data types consistent.
- The inputs must be two tensors or one tensor and one scalar.
- When the inputs are two tensors, the shapes of them could be broadcast.
- When the inputs are one tensor and one scalar, the scalar could only be a constant.
Args:
x (Union[Tensor, Number]): The first input is a number or
a tensor whose data type is number.
@ -3036,12 +3037,13 @@ def minimum(x, y):
r"""
Computes the minimum of input tensors element-wise.
Inputs of `x` and `y` comply with the implicit type conversion rules to make the data types consistent.
The inputs must be two tensors or one tensor and one scalar.
When the inputs are two tensors, dtypes of them cannot be bool at the same time.
When the inputs are one tensor and one scalar, the scalar could only be a constant.
Shapes of them are supposed to be broadcast.
If one of the elements being compared is a NaN, then that element is returned.
Note:
- Inputs of `x` and `y` comply with the implicit type conversion rules to make the data types consistent.
- The inputs must be two tensors or one tensor and one scalar.
- When the inputs are two tensors, dtypes of them cannot be bool at the same time.
- When the inputs are one tensor and one scalar, the scalar could only be a constant.
- Shapes of them are supposed to be broadcast.
- If one of the elements being compared is a NaN, then that element is returned.
.. math::
output_i = min(x_i, y_i)

View File

@ -347,7 +347,7 @@ def random_poisson(shape, rate, seed=None, dtype=mstype.float32):
mindspore.dtype.float64, mindspore.dtype.float32 or mindspore.dtype.float16. Default: mindspore.dtype.float32.
Returns:
A Tensor whose shape is `mindspore.concat([`shape`, mindspore.shape(`rate`)], axis=0)` and data type is equal to
A Tensor whose shape is `mindspore.concat(['shape', mindspore.shape('rate')], axis=0)` and data type is equal to
argument `dtype`.
Raises:

View File

@ -634,6 +634,7 @@ class ReduceMean(_Reduce):
TypeError: If `keep_dims` is not a bool.
TypeError: If `x` is not a Tensor.
TypeError: If `axis` is not one of the following: int, tuple or list.
ValueError: If `axis` is out of range.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -918,6 +919,7 @@ class ReduceMax(_Reduce):
TypeError: If `keep_dims` is not a bool.
TypeError: If `x` is not a Tensor.
TypeError: If `axis` is not one of the following: int, tuple or list.
ValueError: If `axis` is out of range.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -1004,6 +1006,7 @@ class ReduceMin(_Reduce):
TypeError: If `keep_dims` is not a bool.
TypeError: If `x` is not a Tensor.
TypeError: If `axis` is not one of the following: int, tuple or list.
ValueError: If `axis` is out of range.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -1126,6 +1129,7 @@ class ReduceProd(_Reduce):
TypeError: If `keep_dims` is not a bool.
TypeError: If `x` is not a Tensor.
TypeError: If `axis` is not one of the following: int, tuple or list.
ValueError: If `axis` is out of range.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``