[object Object]

[object Object][object Object]undefined
[object Object]
  • This API performs the backpropagation of 3D average pooling and calculates the input gradient of the forward propagation of 3D average pooling.

  • Formula: The relationship among the input(N,C,Din,Hin,WinN,C,D_{in},H_{in},W_{in}), gradOutput(N,C,Dout,Hout,WoutN,C,D_{out},H_{out},W_{out}), pooling stride (stridestride), and kernelSize (kD,kH,kWkD,kH,kW) during backpropagation is as follows:

    Din=(Dout1)stride[0]+kernel_size[0]2padding[0]D_{in} = (D_{out} - 1) * {stride[0]} + kernel\_size[0] - 2 * padding[0] Hin=(Hout1)stride[1]+kernel_size[1]2padding[1]H_{in} = (H_{out} - 1) * {stride[1]} + kernel\_size[1] - 2 * padding[1] Win=(Wout1)stride[2]+kernel_size[2]2padding[2]W_{in} = (W_{out} - 1) * {stride[2]} + kernel\_size[2] - 2 * padding[2]

    If ceilMode is true and the following condition is met:

    (Dout1)stride[0]>=Din+padding[0](D_{out} - 1) * stride[0] >= D_{in} + padding[0]

    Then, the shape of D_{out} needs to be reduced by 1. The same rule applies to H_{out},W_{out}.

[object Object]

Each operator has calls. First, aclnnAvgPool3dBackwardGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnAvgPool3dBackward 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]
  • Deterministic compute:
    • aclnnAvgPool3dBackward defaults to a non-deterministic implementation. You can call aclrtCtxSetSysParamOpt to enable deterministic compute.
[object Object]

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

[object Object]