[object Object]

[object Object][object Object]undefined
[object Object]
  • 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:

    outi={0, with probability prob11probselfi, with probability 1probout_i=\begin{cases} 0,&\text { with probability }prob \\ \frac{1}{1-prob}self_i, &\text { with probability }1-prob \end{cases}
[object Object]

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.

[object Object]
[object Object]
[object Object]
  • 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]
[object Object]
  • Parameters

    [object Object]
  • Returns

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic computation:
    • [object Object] defaults to a deterministic implementation.
[object Object]

The following example is for reference only. For details, see .

[object Object]