drop_block2d¶
dragon.vm.torch.nn.functional.
drop_block2d
(
input,
p=0.5,
block_size=1,
training=True,
inplace=False
)[source]¶Set the blocks over input to zero randomly.
- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- p (float, optional, default=0.5) – The probability to zero an element.
- block_size (int, optional, default=1) – The spatial block size.
- training (bool, optional, default=True) – Apply dropping if
True
. - inplace (bool, optional, default=False) – Whether to do the operation in-place.
- Returns:
dragon.vm.torch.Tensor – The output tensor.
See also