Developer Guide for Intel® Data Analytics Acceleration Library 2019 Update 4
The forward two-dimensional (2D) spatial pyramid pooling layer with pyramid height L ∈ N is a form of non-linear downsampling of an input tensor X . For more details, see Forward 2D Spatial Pyramid Pooling Layer.
The backward 2D spatial pyramid pooling layer computes the input gradient G ∈ R n 1 x n' , where n' is computed on the preceding layer as explained for the forward layer. Only the elements corresponding to the values pooled from subtensors in the forward computation step are propagated to the next layer.
The library provides several spatial pyramid pooling layers:
The following description applies to each of these layers.
Let G ∈ R n 1 x n' be the two-dimensional tensor with the input gradient and k 1 and k 2 be the dimensions along which pooling kernels are applied. The backward 2D spatial pyramid pooling layer computes gradients for every pooling level from the respective input gradient and accumulates the pooling gradients to get the output gradient Z = (z i 1 ...i p ) ∈ R n 1 x n 2 x ... x n p of the layer:
The following figure illustrates the behavior of the backward spatial
pyramid maximum pooling layer with pyramid height
L = 2: