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.
Refer to
mindspore.ops.dropout3d()
for more detail.Note
The keep probability \(keep_prob\) is equal to ‘ops.dropout3d’ input ‘1-p’.
- 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)