3D Max Pooling Backward Layer

The forward three-dimensional (3D) max pooling layer is a form of non-linear downsampling of an input tensor XR n 1 x n 2 x ... x n p . 3D max pooling partitions the input tensor data into 3D subtensors along dimensions k 1, k 2, and k 3, selects an element with the maximal numeric value in each subtensor, and transforms the input tensor to the output tensor by replacing each subtensor with its maximum element. For more details, see Forward 3D Max Pooling Layer.

The backward 3D max pooling layer back-propagates the input gradient GR l 1 x ... x l p computed on the preceding layer. The backward layer propagates to the next layer only the elements of the gradient that correspond to the maximum values pooled from subtensors in the forward computation step.

Problem Statement


  • p-dimensional tensor GR l 1 x ... x l p with the gradient computed on the preceding layer

  • Dimensions k 1, k 2, and k 3 along which the kernel is applied

  • Kernel sizes m 1, m2, and m 3: where p 1, p 2 and p 3 are paddings

The problem is to compute the value tensor Z = (z i 1...i p ) ∈ R n 1 x ... x n p such that:


  • s 1, s 2, and s 3 are strides

If m 1 > s 1, m 2 > s 2, or m 3 > s 3 (including the cases where any of these conditions are met simultaneously) and if overlapping subtensors are represented with the same maximum located at the same position in the input tensor X, the gradient value z at this position is the sum of input gradients g at the respective positions. This behavior is similar to the behavior of two-dimensional max pooling. Therefore, for an illustration see Backward 2D Max Pooling Layer.

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