Ejemplo n.º 1
0
        public void AddLayer(NeuralLayer layer)
        {
            var dendriteCount = (Layers.Count > 0) ? Layers.Last().Neurons.Count : 1;

            Enumerable
            .Range(0, dendriteCount)
            .ToList()
            .ForEach((dendrite) =>
            {
                layer.Neurons.ForEach(neuron => neuron.Dendrites.Add(new Dendrite()));
            });
        }
Ejemplo n.º 2
0
        private void AppendLayer(NeuralLayer from, NeuralLayer to)
        {
            from.Neurons.ForEach(neuron => neuron.Dendrites.Add(new Dendrite()));

            to.Neurons
            .ForEach((toNeuron) =>
            {
                from.Neurons
                .ForEach(fromNeuron => toNeuron.Dendrites.Add(new Dendrite()
                {
                    CarriedPulse = fromNeuron.OutputPulse, SynapticWeight = to.Weight
                }));
            });
        }