!40273 modify the format of API files

Merge pull request !40273 from 宦晓玲/code_docs_0811
This commit is contained in:
i-robot 2022-08-11 08:15:02 +00:00 committed by Gitee
commit 08dc14fb7b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 84 additions and 84 deletions

View File

@ -57,6 +57,7 @@ mindspore.nn.Conv1d
.. math::
L_{out} \left \lfloor{\frac{L_{in} + 2 \times padding - (\text{kernel_size} - 1) \times
\text{dilation} - 1 }{\text{stride}} + 1} \right \rfloor
异常:
- **TypeError** - `in_channels``out_channels``kernel_size``stride``padding``dilation` 不是int。
- **ValueError** - `in_channels``out_channels``kernel_size``stride``dilation` 小于1。

View File

@ -9,8 +9,7 @@ mindspore.ops.median
- **x** (Tensor) - median的输入任意维度的Tensor。数据类型支持int16、int32、int64、float32或float64。
- **global_median** (bool) - 表示是否对x的全部元素取中值。默认值False。
- **axis** (int) - 指定计算维度。默认值:(0), 取值范围为[-dims, dims - 1]`dims` 表示 `x` 的维度长度
- **keep_dims** (bool) - 表示是否减少维度如果为True输出将与输入保持相同的维度如果为False输出将减少维度。
默认值False。
- **keep_dims** (bool) - 表示是否减少维度如果为True输出将与输入保持相同的维度如果为False输出将减少维度。默认值False。
返回:
- **y** (Tensor) - 返回指定维度上的中值,数据类型与 `x` 相同。

View File

@ -2018,7 +2018,7 @@ class CrossEntropyLoss(LossBase):
where `C = number of classes`. Data type must be float16 or float32.
- **labels** (Tensor) - For class indices, tensor of shape :math:`()`, :math:`(N)` or
:math:`(N, d_1, d_2, ..., d_K)` , data type must be int32.
For probabilities, tensor of shape :math:`(C,)` :math:`(N, C)` or :math:`(N, C, d_1, d_2, ..., d_K)`,
For probabilities, tensor of shape :math:`(C,)` :math:`(N, C)` or :math:`(N, C, d_1, d_2, ..., d_K)` ,
data type must be float16 or float32.
Returns: