Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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