Test it on the Peltarion Platform

A platform to build and deploy deep learning projects.

Even if you’re not an AI superstar.

TRY FOR FREE

1D Global max pooling

This block performs exactly the same operation as the 1D Max pooling block except that the pool size is the size of the entire input of the block, i.e., it computes a single max value for each of the input channels.

Input

The 1D Global max pooling block takes a 2-dimensional tensor tensor of size (input size) x (input channels) and computes the maximum of all the (input size) values for each of the (input channels).

If your input has only one dimension, you can use a reshape block with a Target shape of (input size, 1) to make it compatible with the 1D Global max pooling block.

Output

The output is thus a 1-dimensional tensor of size (input channels).

1D Global max pooling
Figure 1. A 1D Global max pooling.

Use global max pooling blocks as an alternative to the Flattening block after the last pooling block of your convolutional neural network. Using 1D Global max pooling block can replace the fully connected blocks of your CNN. For more information, see Section 3.2 of Min Lin, Qiang Chen, Shuicheng Yan. Network In Network.