mindspore/docs/api/api_python/nn/mindspore.nn.Dropout2d.rst

13 lines
688 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.nn.Dropout2d
======================
.. py:class:: mindspore.nn.Dropout2d(p=0.5)
在训练期间,服从伯努利分布的概率 `p` 随机将输入Tensor的某些通道置为零对于shape为 :math:`NCHW` 的四维Tensor其通道特征图指的是后两维 :math:`HW` 的二维特征图)。
例如,对于批处理输入中第 :math:`i` 批样本的第 :math:`j` 个通道是一个待处理的二维Tensor `input[i, j]`
在每次前向传播时,每个通道将会独立地以概率 `p` 来确定是否被置为零。
`Dropout2d` 可以提高通道特征映射之间的独立性。
更多参考详见 :func:`mindspore.ops.dropout2d`