Shortcuts

drop_block3d

torchvision.ops.drop_block3d(input: torch.Tensor, p: float, block_size: int, inplace: bool = False, eps: float = 1e-06, training: bool = True)torch.Tensor[source]

Implements DropBlock3d from “DropBlock: A regularization method for convolutional networks” <https://arxiv.org/abs/1810.12890>.

Parameters
  • input (Tensor[N, C, D, H, W]) – The input tensor or 5-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, D, H, W]

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources