public void CreateNet(int numOfHIddenLayers, int numOfInputs, int NeuronsPerHidden, int numOfOutputs) { outputAmount = numOfOutputs; for (int i = 0; i < numOfHIddenLayers; i++) { NLayer layer = new NLayer(); layer.PopulateLayer(NeuronsPerHidden, numOfInputs); hiddenLayers.Add(layer); } outputLayer = new NLayer(); outputLayer.PopulateLayer(numOfOutputs, NeuronsPerHidden); }
public void CreateNet(int numOfInputs, int numOfHIddenLayers, int neuronsPerHidden, int numOfOutputs) { hiddenLayers.Clear(); inputAmount = numOfInputs; outputAmount = numOfOutputs; inputlayer = new NLayer(LayerType.NInput); inputlayer.PopulateLayer(numOfInputs, 1); for (int i = 0; i < numOfHIddenLayers; i++) { NLayer layer = new NLayer(LayerType.NHidden); layer.PopulateLayer(neuronsPerHidden, numOfInputs); hiddenLayers.Add(layer); numOfInputs = neuronsPerHidden; } outputLayer = new NLayer(LayerType.NOutput); outputLayer.PopulateLayer(numOfOutputs, numOfInputs); }