mindspore.ops.Dropout3D

class mindspore.ops.Dropout3D(keep_prob=0.5)[source]

During training, randomly zeroes some channels of the input tensor with probability 1-keep_prob from a Bernoulli distribution(For a 5-dimensional tensor with a shape of NCDHW, the channel feature map refers to a 3-dimensional feature map with a shape of DHW).

Dropout3D can improve the independence between channel feature maps.

Note

The keep probability \(keep\_prob\) is equal to \(1 - p\) in mindspore.ops.dropout3d().

Refer to mindspore.ops.dropout3d() for more details.

Supported Platforms:

Ascend GPU CPU

Examples

>>> dropout = ops.Dropout3D(keep_prob=0.5)
>>> x = Tensor(np.ones([2, 1, 2, 1, 2]), mindspore.float32)
>>> output, mask = dropout(x)
>>> print(output.shape)
(2, 1, 2, 1, 2)