Function: During training, this API randomly sets elements in the input to zero based on the probability prob, and amplifies the output by 1/(1 – prob). If a bit in
[object Object]is[object Object], the corresponding input element is scaled; If the bit in the mask is 0, the corresponding element in self is set to zero. Specifically, if prob is 0, the elements in self are not changed. If prob is 1, all elements are set to zero.Formulas:
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.
Parameters
[object Object]Returns
[object Object]: status code. For details, see .The first-phase API implements input parameter validation. The following error codes may be returned:
[object Object]
- Deterministic computation:
[object Object]defaults to a deterministic implementation.
The following example is for reference only. For details, see .