nnf_dropout2d: Dropout2d

View source: R/nnf-dropout.R

nnf_dropout2dR Documentation

Dropout2d

Description

Randomly zero out entire channels (a channel is a 2D feature map, e.g., the j-th channel of the i-th sample in the batched input is a 2D tensor 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.

Usage

nnf_dropout2d(input, p = 0.5, training = TRUE, inplace = FALSE)

Arguments

input

the input tensor

p

probability of a channel to be zeroed. Default: 0.5

training

apply dropout if is TRUE. Default: TRUE.

inplace

If set to TRUE, will do this operation in-place. Default: FALSE


torch documentation built on June 7, 2023, 6:19 p.m.