LogSumExp() private method

private LogSumExp ( this array ) : double
array this
return double
Exemplo n.º 1
0
        public static double[] Softmax(double[] input, double[] result)
        {
            double sum = Special.LogSumExp(input);

            for (int i = 0; i < input.Length; i++)
            {
                result[i] = Math.Exp(input[i] - sum);
            }

            return(result);
        }