[object Object]

[object Object][object Object]undefined
[object Object]
  • API function: Implements the FusedEmaAdam fusion optimizer.
  • Formula:(correctionβ1,correctionβ2)={(1,1),biasCorrection=False(1β1step,1β2step),biasCorrection=True(correction_{\beta_1},correction_{\beta_2})=\begin{cases} (1,1),&biasCorrection=False\\ (1-\beta_1^{step},1-\beta_2^{step}),&biasCorrection=True \end{cases} grad={grad+weightDecayvar,mode=0grad,mode=1grad=\begin{cases} grad+weightDecay*var,&mode=0\\ grad,&mode=1 \end{cases} mout=β1m+(1β1)gradm_{out}=\beta_1*m+(1-\beta_1)*grad vout=β2v+(1β2)grad2v_{out}=\beta_2*v+(1-\beta_2)*grad^2 mnext=mout/correctionβ1m_{next}=m_{out}/correction_{\beta_1} vnext=vout/correctionβ2v_{next}=v_{out}/correction_{\beta_2} denom=vnext+epsdenom=\sqrt{v_{next}}+eps update={mnext/denom,mode=0mnext/denom+weightDecayvar,mode=1update=\begin{cases} m_{next}/denom,&mode=0\\ m_{next}/denom+weightDecay*var,&mode=1 \end{cases} varout=varlrupdatevar_{out}=var-lr*update sout=emaDecays+(1emaDecay)varouts_{out}=emaDecay*s+(1-emaDecay)*var_{out}
[object Object]

Each operator has calls. First, aclnnApplyFusedEmaAdamGetWorkspaceSize is called to obtain the input, the workspace size required for computation, and the executor that contains the operator computation process. Then, aclnnApplyFusedEmaAdam 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 verification. The following errors may be thrown.

    [object Object]
[object Object]
  • Parameters:

    [object Object]
  • Returns:

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

[object Object]

The data types and shapes of the input grad, var, m, v, and s must be the same.

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

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

[object Object]