3D Average Pooling Forward Layer

The forward three-dimensional (3D) average pooling layer is a form of non-linear downsampling of an input tensor X = (x (1) ... x (p)) of size n 1 x n 2 x ... x n p . 3D average pooling partitions the input tensor data into 3D subtensors by three dimensions k 1k 2, and k 3, computes the average value of elements in each subtensor, and transforms the input tensor to the output tensor Y = (y (1) ... y (p)) of size m 1 x m 2 x ... x m p by replacing each subtensor with one element, the average of the subtensor:

Here f k is the kernel size of the pooled subtensor for the dimension k and s k is the stride, that is, an interval on which each subtensor is selected; p k is the padding for the dimension k.

The size m 1 x m 2 x ... x m p of the output tensor of the forward 3D pooling layer Y is

For k ∈ {k 1, k 2, k 3}, f k cannot be greater than n k .

Problem Statement

To perform average pooling, the problem is to compute the average for each subtensor and apply the transform to the input data.

For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)