!44690 fix bug in function api dropout1d

Merge pull request !44690 from ZhidanLiu/code_docs_master
This commit is contained in:
i-robot 2022-10-27 09:37:33 +00:00 committed by Gitee
commit db66ded59d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 4 additions and 4 deletions

View File

@ -10,10 +10,10 @@ mindspore.nn.Dropout1d
论文 `Dropout: A Simple Way to Prevent Neural Networks from Overfitting <http://www.cs.toronto.edu/~rsalakhu/papers/srivastava14a.pdf>`_ 中提出了该技术,并证明其能有效地减少过度拟合,防止神经元共适应。更多详细信息,请参见 `Improving neural networks by preventing co-adaptation of feature detectors <https://arxiv.org/pdf/1207.0580.pdf>`_
`dropout1d` 可以提高通道特征映射之间的独立性。
`Dropout1d` 可以提高通道特征映射之间的独立性。
参数:
- **p** (float) - 通道的丢弃概率,介于 0 1 之间,例如 `p` = 0.8意味着80%的清零概率。默认值0.5。
- **p** (float) - 通道的丢弃概率介于0和1之间例如 `p` = 0.8意味着80%的清零概率。默认值0.5。
输入:
- **x** (Tensor) - 一个shape为 :math:`(N, C, L)`:math:`(C, L)``3D``2D` Tensor其中N是批处理大小`C` 是通道数,`L` 是特征长度。其数据类型应为int8、int16、int32、int64、float16、float32或float64。

View File

@ -1,7 +1,7 @@
mindspore.ops.dropout1d
========================
.. py:function:: mindspore.ops.dropout1d(x, p=0.5)
.. py:function:: mindspore.ops.dropout1d(x, p=0.5, training=True)
在训练期间,以服从伯努利分布的概率 `p` 随机将输入Tensor的某些通道归零。对于shape为 `NCL` 的三维Tensor
其通道特征图指的是后一维 `L` 的一维特征图)。

View File

@ -210,7 +210,7 @@ class Dropout1d(Cell):
`C` is the number of channels, `L` is the feature length. The data type must be int8, int16, int32,
int64, float16, float32 or float64.
Returns:
Outputs:
Tensor, output, with the same shape and data type as `x`.
Raises: