Ejemplo n.º 1
0
        private double[] ThinkBetweenTwoLayers(double[] input, double[][] wages, double[] biases)
        {
            var output = new double[wages[0].Length];

            if (output.Length != biases.Length)
            {
                throw new ArgumentException();
            }

            for (int i = 0; i < output.Length; i++)
            {
                var net = biases[i];

                for (int j = 0; j < wages.GetLength(0); j++)
                {
                    net += input[j] * wages[j][i];
                }

                output[i] = activationFunction.Impuls(net);
            }

            return(output);
        }