function X = internal_leakyrelu(X, scale)
% This function is undocumented and will change in a future release.

%   Copyright 2019 The MathWorks, Inc.

if scale < 1
    X = max(X*scale, X, 'includenan');
elseif scale > 1
    X = min(X*scale, X, 'includenan');
end

end

