1

In normal pooling operations we have to mention pool size for pooling operation, like for 2D pooling operations we mention (2,2); however, in global pooling operation it is not required. So is it the same size as input? I am working on Keras. Here one author mentions that the pooling size is the same as input size or input size-filter size+1. Which one is correct?

today
  • 32,602
  • 8
  • 95
  • 115
Hitesh
  • 1,285
  • 6
  • 20
  • 36

2 Answers2

3

In case of 1D pooling, as mentioned in Keras docs, it takes as input an array of shape (batch_size, steps, features) and its output shape is (batch_size, features). So the pool size is equal to steps.

In case of 2D pooling, as mentioned in Keras docs, it takes as input an array of shape (batch_size, rows, cols, channels) and its output shape is (batch_size, channels). So the pool size is equal to (rows, cols).

In both cases, the pool size is consistent with the intuition behind it: taking maximum value over the whole data axes (i.e. global).

today
  • 32,602
  • 8
  • 95
  • 115
1

If the input shape is (None, rows, cols, filters), then global pooling uses pool_size of (rows, cols).

Kota Mori
  • 6,510
  • 1
  • 21
  • 25