Keras Layers API (Part 2)

Learn about the pooling, normalization, and dropout layers of a neural network, and use Keras to implement these layers.

Pooling layers

A pooling layer reduces network parameters and saves subsequent computations. It replaces the input data with a summary statistic of the nearby points. It’s a type of nonlinear downsampling. Usually, we use:

  • Max pooling: This selects the maximum value within a rectangular neighborhood.

  • Average pooling: This computes the average output.

The following code implements both pooling types in a 2x2 neighborhood with a stride (slide) of two units, though we can use other size localities and strides in pooling layers.

Get hands-on with 1200+ tech skills courses.