Description: Performs backpropagation of . It is used to compute the gradient of the input tensor, so that the model parameters can be updated during backpropagation.
Formula:
When training is true:
When training is false:
Each operator has calls. First, aclnnBatchNormBackwardGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnBatchNormBackward is called to perform computation.
Parameters
[object Object][object Object]Atlas training products[object Object] and [object Object]Atlas inference products[object Object]:
- The data types of the
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object], and[object Object]parameters cannot be BFLOAT16. - The data types of the
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object], and[object Object]parameters are the same as that of[object Object]. - The data formats of the
[object Object],[object Object], and[object Object]parameters cannot be NHWC and NDHWC.
- The data types of the
[object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:
- The data types of the
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object], and[object Object]parameters are the same as that of[object Object]. - The data formats of the
[object Object],[object Object], and[object Object]parameters cannot be NHWC and NDHWC.
- The data types of the
Ascend 950PR/Ascend 950DT:
- When
[object Object]is set to FLOAT32,[object Object],[object Object],[object Object],[object Object],[object Object]must be set to FLOAT32. - When
[object Object]is set to FLOAT16,[object Object],[object Object],[object Object],[object Object],[object Object]must be set to FLOAT16 or FLOAT32. - When
[object Object]is BFLOAT16,[object Object],[object Object],[object Object],[object Object],[object Object]must be BFLOAT16 or FLOAT32. - If
[object Object]is FLOAT32,[object Object]must be FLOAT32. If[object Object]is FLOAT16,[object Object]must be FLOAT16 or FLOAT32. If[object Object]is BFLOAT16,[object Object]must be BFLOAT16 or FLOAT32. - The data type of
[object Object]must be the same as that of[object Object]. - The data type of
[object Object]must be the same as that of[object Object].
- When
Returns:
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
- Deterministic compute:
- aclnnBatchNormBackward defaults to a non-deterministic implementation. You can call aclrtCtxSetSysParamOpt to enable deterministic compute.
The following example is for reference only. For details, see .