[object Object]

[object Object][object Object]undefined
[object Object]
  • Description:

    • Applies three-dimensional max pooling over the input channels of an input signal, and outputs the value out and indices after pooling.
    • In the input dims, N represents the batch size, C represents the channel, D represents the depth, W represents the width, and H represents the height.
    • When the D H W exceeds int32, it is recommended that the D axis be split in the model size.
  • Formula:

    • Calculation formula of each element of the output tensor:

      out(Ni,Cj,d,h,w)=maxk[0,kD1],m[0,kH1],n[0,kW1]input(Ni,Cj,stride[0]×d+k,stride[1]×h+m,stride[2]×w+n)out(N_i, C_j, d, h, w) = \max\limits_{{k\in[0,k_{D}-1],m\in[0,k_{H}-1],n\in[0,k_{W}-1]}}input(N_i,C_j,stride[0]\times d + k, stride[1]\times h + m, stride[2]\times w + n)
    • Formula for deducing the output tensor shape (with ceilMode set to false by default, that is, rounding down)

[N,C,Dout,Hout,Wout]=[N,C,Din+2×padding[0]dilation[0]×(kernelSize[0]1)1stride[0]+1,Hin+2×padding[1]dilation[1]×(kernelSize[1]1)1stride[1]+1,Win+2×padding[2]dilation[2]×(kernelSize[2]1)1stride[2]+1][N, C, D_{out}, H_{out}, W_{out}]=[N,C,\lfloor{\frac{D_{in}+2 \times {padding[0] - dilation[0] \times(kernelSize[0] - 1) - 1}}{stride[0]}}\rfloor + 1,\\ \lfloor{\frac{H_{in}+2 \times {padding[1] - dilation[1] \times(kernelSize[1] - 1) - 1}}{stride[1]}}\rfloor + 1, \\ \lfloor{\frac{W_{in}+2 \times {padding[2] - dilation[2] \times(kernelSize[2] - 1) - 1}}{stride[2]}}\rfloor + 1]
  • Formula for deducing the output tensor shape (with ceilMode set to true by default, that is, rounding up)
[N,C,Dout,Hout,Wout]=[N,C,Din+2×padding[0]dilation[0]×(kernelSize[0]1)1stride[0]+1,Hin+2×padding[1]dilation[1]×(kernelSize[1]1)1stride[1]+1,Win+2×padding[2]dilation[2]×(kernelSize[2]1)1stride[2]+1][N, C, D_{out}, H_{out}, W_{out}]=[N,C,\lceil{\frac{D_{in}+2 \times {padding[0] - dilation[0] \times(kernelSize[0] - 1) - 1}}{stride[0]}}\rceil + 1,\\ \lceil{\frac{H_{in}+2 \times {padding[1] - dilation[1] \times(kernelSize[1] - 1) - 1}}{stride[1]}}\rceil + 1, \\ \lceil{\frac{W_{in}+2 \times {padding[2] - dilation[2] \times(kernelSize[2] - 1) - 1}}{stride[2]}}\rceil + 1] [object Object]

Each operator has calls. First, aclnnMaxPool3dWithArgmaxGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnMaxPool3dWithArgmax is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters:

    [object Object]
    • For the [object Object]Atlas A3 training products/Atlas A3 inference products[object Object] and [object Object]Atlas A2 training products/Atlas A2 inference products[object Object], the value of the [object Object] element can only be 1. The [object Object] data type does not support INT64. The input data format does not support NDHWC. The depthheightwidth cannot be greater than the maximum int32.
  • 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 computing: The aclnnMaxPool3dWithArgmax is implemented in deterministic mode by default.

  • The kernelSize, stride, padding, dilation, and ceilMode parameters must ensure that no axis in the out shape is less than 1.

  • If ceilMode is set to True and sliding windows are all in the right padded region, the output result will be ignored.

[object Object]

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

[object Object]