We will implement two big classes. The first one is the implementation for the Perceptron data type, and the second one is the data type handling the neural network. Go through the following steps to implement these two classes:
- Implement a Perceptron class derived from the InputPerceptron class that was previously defined:
public class Perceptron : InputPerceptron { public InputPerceptron[] inputList; public delegate float Threshold(float x); public Threshold threshold; public float state; public float error; }
- Implement the constructor for setting the number of inputs:
public Perceptron(int inputSize) { inputList = new InputPerceptron[inputSize]; }
- Define the function for processing the inputs:
public void FeedForward() ...