forked from mindspore-Ecosystem/mindspore
!44690 fix bug in function api dropout1d
Merge pull request !44690 from ZhidanLiu/code_docs_master
This commit is contained in:
commit
db66ded59d
|
@ -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。
|
||||
|
|
|
@ -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` 的一维特征图)。
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue