Created
January 27, 2018 12:30
-
-
Save NMZivkovic/e7e4268b32cdce52327ddd88ef67ac99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NeuralLayer | |
{ | |
public List<INeuron> Neurons; | |
public NeuralLayer() | |
{ | |
Neurons = new List<INeuron>(); | |
} | |
/// <summary> | |
/// Connecting two layers. | |
/// </summary> | |
public void ConnectLayers(NeuralLayer inputLayer) | |
{ | |
var combos = Neurons.SelectMany(neuron => inputLayer.Neurons, (neuron, input) => new { neuron, input }); | |
combos.ToList().ForEach(x => x.neuron.AddInputNeuron(x.input)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment