This API is used to implement the AdamW optimizer.
Formula:
Each operator has calls. First, aclnnApplyAdamWV2GetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnApplyAdamWV2 is called to perform computation.
[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]
- The data types of varRef, mRef, vRef, and grad in the input tensor must be the same. The supported data types are FLOAT16, BFLOAT16, and FLOAT32.
- The shapes of varRef, mRef, vRef, and grad in the input tensor must be the same.
- Deterministic compute:
- aclnnApplyAdamWV2 defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]