May 2018
Beginner
490 pages
13h 16m
English
Pooling reduces the size of an input representation, in this case, an image. Max pooling consists of applying a max pooling window to a layer of the image:
classifier.add(MaxPooling2D(pool_size = (2, 2)))
This pool_size 2 x 2 window will first find the maximum value of the 2 x 2 matrix on the top left of the image matrix. This first maximum value is 4. It is thus the first value of the pooling window on the right.
Then the max pooling window hops over two squares and finds that 5 is the highest value. 5 is written in the max pooling window. The hop action is called a stride. A stride value of 2 will avoid overlapping although some CNN models have strides that overlap. It all depends on your goal. Look at the following diagram:
Read now
Unlock full access