function layer = swishLayer(nameValueArgs)
% swishLayer   Swish layer
%
%   layer = swishLayer creates a swish layer. The swish operation is given
%   by X.*sigmoid(X), where X is the layer input.
%
%   layer = swishLayer('Name', name) additionally specifies the layer name.
%
%   Example:
%       Create a swish layer.
%
%       layer = swishLayer;
%
%   See also nnet.cnn.layer.SwishLayer, eluLayer, reluLayer.
%
%   <a href="matlab:helpview('deeplearning','list_of_layers')">List of Deep Learning Layers</a>

%   Copyright 2020 The MathWorks, Inc.

% Declare input argument restrictions.
arguments
    nameValueArgs.Name {iAssertValidLayerName} = ''
end

layer = nnet.cnn.layer.SwishLayer(nameValueArgs.Name);

end

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