fn
dropout3d
→Tensordropout3d(x: Tensor, p: float = 0.5, training: bool = True)Channel-wise dropout for 3-D (volumetric) feature maps.
Drops entire 3-D feature maps of an
tensor with probability p and rescales survivors by
. Used in 3-D ConvNets for video and volumetric
medical imaging, where spatio-temporal locality makes per-
element dropout statistically inefficient (same rationale as
dropout2d).
Parameters
xTensorInput tensor of shape .
pfloat= 0.5Channel-drop probability in (default
0.5).trainingbool= TrueWhen
False, identity (default True).Returns
TensorSame shape and dtype as x.
Notes
For each batch element and channel , draw and broadcast over the volumetric dimensions:
Examples
>>> import lucid
>>> from lucid.nn.functional import dropout3d
>>> x = lucid.ones((1, 4, 3, 4, 4))
>>> y = dropout3d(x, p=0.5, training=True)