Document feedback

Question document fragment

When a question document fragment contains a formula, it is displayed as a space.

Submission type
issue

It's a little complicated...

I'd like to ask someone.

Please select the submission type

Problem type
Specifications and Common Mistakes

- Specifications and Common Mistakes:

- Misspellings or punctuation mistakes,incorrect formulas, abnormal display.

- Incorrect links, empty cells, or wrong formats.

- Chinese characters in English context.

- Minor inconsistencies between the UI and descriptions.

- Low writing fluency that does not affect understanding.

- Incorrect version numbers, including software package names and version numbers on the UI.

Usability

- Usability:

- Incorrect or missing key steps.

- Missing main function descriptions, keyword explanation, necessary prerequisites, or precautions.

- Ambiguous descriptions, unclear reference, or contradictory context.

- Unclear logic, such as missing classifications, items, and steps.

Correctness

- Correctness:

- Technical principles, function descriptions, supported platforms, parameter types, or exceptions inconsistent with that of software implementation.

- Incorrect schematic or architecture diagrams.

- Incorrect commands or command parameters.

- Incorrect code.

- Commands inconsistent with the functions.

- Wrong screenshots.

- Sample code running error, or running results inconsistent with the expectation.

Risk Warnings

- Risk Warnings:

- Lack of risk warnings for operations that may damage the system or important data.

Content Compliance

- Content Compliance:

- Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions.

- Copyright infringement.

Please select the type of question

Problem description

Describe the bug so that we can quickly locate the problem.

mindspore.ops.Dropout3D

class mindspore.ops.Dropout3D(*args, **kwargs)[source]

During training, randomly zeroes some of the channels of the input tensor with probability 1-keep_prob from a Bernoulli distribution.

Parameters

keep_prob (float) – The keep probability of a channel, between 0 and 1, e.g. keep_prob = 0.8, means dropping out 20% of channels. Default: 0.5.

Inputs:
  • input_x (Tensor) - A 5-D tensor with shape (N,C,D,H,W). The data type should be int8, int16, int32, int64, float16 or float32

Outputs:
  • output (Tensor) - with the same shape and data type as the input_x tensor.

  • mask (Tensor[bool]) - with the same shape as the input_x tensor.

Raises
  • TypeError – If the data type of keep_prob is not float.

  • ValueError – If keep_prob is out of the range [0.0, 1.0]; or if the dim of input is not 5-D.

Supported Platforms:

Ascend GPU

Examples

>>> dropout = ops.Dropout3D(keep_prob=0.5)
>>> input_x = Tensor(np.random.randn(2, 1, 2, 1, 2), mindspore.float32)
>>> output, mask = dropout(input_x)
>>> print(output)
[[[[[0. 0.]]
   [[0. 0.]]]]
 [[[[-2.98 -0.01]]
   [[-0.34 1.57]]]]]
>>> print(mask)
[[[[[False False]]
   [[False False]]]]
 [[[[True True]]
   [[True True]]]]]