public double Calculate(double[] x) { double result = 0.0; iLInput = x; iLOutput = inputLayer.Calculate(iLInput); hLInput = Link1(iLOutput); hLOutput = hiddenLayer.Calculate(hLInput); oLInput = Link2(hLOutput); oLOutput = outputLayer.Calculate(oLInput); return(result); }
public void Calculate(double[] inputValues) { //set all the values of the input layer for (int i = 0; i < InputLayer.Neurons.Count; i++) { InputLayer.Neurons[i].Value = inputValues[i]; } //calculate the hidden layers... layer by layer for (int i = 0; i < HiddenLayers.Length; i++) { HiddenLayers[i].Calculate(this); } //calculate the output layer OutputLayer.Calculate(this); }