Pooling layers help with overfitting and improve performance by reducing the size of the input tensor. Typically, they are used to scale down the input, keeping important information. Pooling is a much faster mechanism for input size reduction compared with tf.nn.conv2d.
The following pooling mechanisms are supported by TensorFlow:
- Average
- Max
- Max with argmax
Each pooling operation uses rectangular windows of size ksize separated by offset strides. If strides are all ones (1, 1, 1, 1), every window is used; if strides are all twos (1, 2, 2, 1), every other window is used in each dimension; and so on.