drop_block2dΒΆ
- torchvision.ops.drop_block2d(input: Tensor, p: float, block_size: int, inplace: bool = False, eps: float = 1e-06, training: bool = True) Tensor [source]ΒΆ
Implements DropBlock2d from βDropBlock: A regularization method for convolutional networksβ <https://arxiv.org/abs/1810.12890>.
- Parameters:
input (Tensor[N, C, H, W]) β The input tensor or 4-dimensions with the first one being its batch i.e. a batch with
N
rows.p (float) β Probability of an element to be dropped.
block_size (int) β Size of the block to drop.
inplace (bool) β If set to
True
, will do this operation in-place. Default:False
.eps (float) β A value added to the denominator for numerical stability. Default: 1e-6.
training (bool) β apply dropblock if is
True
. Default:True
.
- Returns:
The randomly zeroed tensor after dropblock.
- Return type:
Tensor[N, C, H, W]