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
The following pooling mechanisms are supported by TensorFlow:
- Max with argmax
Each pooling operation uses rectangular windows of size
ksize separated by offset
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.
The following defined function provides max pooling for the input 4D tensor
max_pool( value, ksize, strides, padding, data_format='NHWC', name=None )
The preceding arguments are explained here:
value: This is the 4D tensor with shape [batch, height, width, channels], type
tf.float32on which max pooling needs to be done.
ksize: This is the list of ints that has