コード例 #1
0
 public Synapse Create()
 {
     return(new Synapse
     {
         Axon = _axonFactory.Create(),
         Weight = _weightInitializer.InitializeWeight()
     });
 }
コード例 #2
0
        internal INeuron CreateNeuron(Dictionary <int, Dictionary <int, IList <Synapse> > > mapping, int layerIndex, int neuronIndex)
        {
            var dendrites = (layerIndex > 0) ? getDendritesForSoma(layerIndex, neuronIndex, mapping) : mapping[layerIndex][neuronIndex];

            var soma = _somaFactory.Create(dendrites, _biasInitiliazer.InitializeWeight());

            var terminals = mapping[layerIndex + 1][neuronIndex];
            var axon      = _axonFactory.Create(terminals);

            return(_neuronFactory.Create(soma, axon));
        }