private void PopulateStructure(int[] nodesPerLayer, ActivationFunctionBase activationFunction) { nodes = new INode[nodesPerLayer.Length][]; for (int i = 0; i < nodesPerLayer.Length; i++) { nodes[i] = new INode[nodesPerLayer[i]]; for (int j = 0; j < nodesPerLayer[i]; j++) { if (i == 0) { nodes[i][j] = new InputNode(); } else { nodes[i][j] = new OutputNode(defaultActivationFunction); } } } }
public OutputNode(ActivationFunctionBase activationFunction) { this.activationFunction = activationFunction; }
public NetworkStructure(int[] nodesPerLayer, ActivationFunctionBase activationFunction) { PopulateStructure(nodesPerLayer, activationFunction); }