function layer = globalMaxPooling1dLayer( NameValueArgs )
% globalMaxPooling1dLayer   1-D global max pooling layer
%
%   layer = globalMaxPooling1dLayer creates a global max pooling
%   layer that outputs the maximum value over the length dimension of the
%   1-D input.
%
%   layer = globalMaxPooling1dLayer('Name', name) additionally
%   specifies the layer name.
%
%   Example:
%       % Create a 1-D global max pooling layer.
%
%       layer = globalMaxPooling1dLayer;
%
%   See also nnet.cnn.layer.GlobalMaxPooling1DLayer,
%   maxPooling1dLayer, averagePooling1dLayer, globalMaxPooling2dLayer.
%
%   <a href="matlab:helpview('deeplearning','list_of_layers')">List of Deep Learning Layers</a>

%   Copyright 2021 The MathWorks, Inc.

arguments
    NameValueArgs.Name {iAssertValidLayerName} = ''
end

layer = nnet.cnn.layer.GlobalMaxPooling1DLayer(...
    nnet.internal.cnn.layer.GlobalMaxPooling1D(char(NameValueArgs.Name)));
end

function iAssertValidLayerName(name)
nnet.internal.cnn.layer.paramvalidation.validateLayerName(name);
end