https://es.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.globalmaxpooling2dlayer.html
GlobalMaxPooling2DLayer - Global max pooling layer - MATLAB
A 2-D global max pooling layer performs downsampling by computing the maximum of the height and width dimensions of the input.
globalmaxpoolinglayermatlab