- Description: Performs three-dimensional average pooling on the input tensor with the window of and stride of . Specifically, is kernelSize, indicating the size of the pooling window. is stride, indicating the pooling stride.
- Formula: The relationship among the input(), out(), pooling stride (), and kernelSize () is as follows:
Each operator has calls. First, aclnnAvgPool3dGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnAvgPool3d is called to perform computation.
[object Object][object Object]
Parameters:
- self (aclTensor*, compute input): tensor to be converted ( in the formula), which is a tensor on the device. Empty tensors are supported. The can be ND (corresponding to CDHW) or 5D-format NCDHW. are supported.
- [object Object]Atlas inference series products[object Object]: The data type can be FLOAT16 or FLOAT32.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training series products/Atlas A3 inference series products[object Object]: The data type can be BFLOAT16, FLOAT16, or FLOAT32.
- kernelSize (aclIntArray*, compute input): pooling window size ( in the formula), which is an aclIntArray on the host. The length is 1 () or 3 (). The data type is INT64. The value must be greater than 0 and less than or equal to the value of the corresponding dimension of the input.
- stride (aclIntArray*, compute input): pooling stride ( in the formula), which is an aclIntArray on the host. The length is 0 (), 1 (), or 3 (). The data type is INT64. The value must be greater than 0.
- padding (aclIntArray*, compute input): number of zero-padding layers in the D, H, and W directions of the input ( in the formula), which is an aclIntArray on the host. The length is 1 () or 3 (). The data type is INT64. The value is within the range of [0, kernelSize/2].
- ceilMode (bool, compute input): The data type can be BOOL. False indicates rounding down when computing the output shape. Otherwise, rounding up.
- countIncludePad (bool, compute input): The data type can be BOOL. True indicates that zero padding is included in the average computation. Otherwise, zero padding is not included.
- divisorOverride (int64_t, compute input): The data type can be INT64. If specified, it is used as a divisor in the average computation. When the value is 0, this attribute does not take effect.
- out (aclTensor*, compute output): output tensor, which is in the formula. The can be ND (corresponding to ()) or 5D (). are supported. The data type and must be the same as those of self.
- [object Object]Atlas inference series products[object Object]: The data type can be FLOAT16 or FLOAT32.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training series products/Atlas A3 inference series products[object Object]: The data type can be BFLOAT16, FLOAT16, or FLOAT32.
- workspaceSize (uint64_t*, output): size of the workspace to be allocated on the device.
- executor (aclOpExecutor**, output): operator executor, containing the operator computation process.
- self (aclTensor*, compute input): tensor to be converted ( in the formula), which is a tensor on the device. Empty tensors are supported. The can be ND (corresponding to CDHW) or 5D-format NCDHW. are supported.
Returns:
[object Object]
Parameters:
- workspace (void *, input): address of the workspace to be allocated on the device.
- workspaceSize (uint64_t, input): size of the workspace to be allocated on the device, which is obtained by calling the first-phase API aclnnAvgPool3dGetWorkspaceSize.
- executor (aclOpExecutor *, input): operator executor, containing the operator computation process.
- stream (aclrtStream, input): stream for executing the task.
Returns:
- Deterministic compute:
- aclnnAvgPool3d defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]