Beispiel #1
0
        public double ForwardPass(double input)
        {
            if (Equals(_type, NeuronType.Input))
            {
                return(OutputData = InputData = input);
            }

            InputData = InputLinks.Select(s => s.Source.OutputData * s.Weight).Sum() + _bias;

            return(OutputData = Activation.Invoke(InputData));
        }
Beispiel #2
0
 public List <double> GetInputWeights()
 {
     return(InputLinks.Select(link => link.Weight).ToList());
 }