torch.nn.functional.dropout2d¶
- torch.nn.functional.dropout2d(input, p=0.5, training=True, inplace=False)[source]¶
Randomly zero out entire channels (a channel is a 2D feature map).
For example, the \(j\)-th channel of the \(i\)-th sample in the batched input is a 2D tensor \(\text{input}[i, j]\) of the input tensor. Each channel will be zeroed out independently on every forward call with probability
p
using samples from a Bernoulli distribution.See
Dropout2d
for details.