!49577 fixed_some_comment

Merge pull request !49577 from yide12/code_docs_nn_master
This commit is contained in:
i-robot 2023-03-01 08:55:39 +00:00 committed by Gitee
commit 5c891c8477
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ mindspore.nn.Dropout
参数:
- **keep_prob** (float) - 废弃。输入神经元保留率,数值范围介于(0, 1]之间。例如,`keep_prob` =0.9删除10%的神经元。默认值0.5。
- **p** (Union(float, int, None)) - 输入神经元丢弃率,数值范围介于[0, 1)之间。例如,`p` =0.9删除90%的神经元。默认值None。
- **p** (Union[float, int, None]) - 输入神经元丢弃率,数值范围介于[0, 1)之间。例如,`p` =0.9删除90%的神经元。默认值None。
输入:
- **x** (Tensor) - Dropout的输入任意维度的Tensor。数据类型必须为float16或float32。

View File

@ -129,7 +129,7 @@ class Dropout(Cell):
Args:
keep_prob (float): Deprecated. The keep rate, greater than 0 and less equal than 1.
E.g. rate=0.9, dropping out 10% of input neurons. Default: 0.5.
p (Union(float, int, None)): The dropout rate, greater than or equal to 0 and less than 1.
p (Union[float, int, None]): The dropout rate, greater than or equal to 0 and less than 1.
E.g. rate=0.9, dropping out 90% of input neurons. Default: None.
Inputs:

View File

@ -3475,7 +3475,7 @@ def leaky_relu(x, alpha=0.2):
Examples:
>>> x = Tensor(np.array([[-1.0, 4.0, -8.0], [2.0, -5.0, 9.0]]), mindspore.float32)
>>> print(ops.leaky_relu(x, negative_slope=0.2))
>>> print(ops.leaky_relu(x, alpha=0.2))
[[-0.2 4. -1.6]
[ 2. -1. 9. ]]
"""