Exemplo n.º 1
0
 /// <summary>
 /// Instanciate a new synapse. You'll hardly need to call this as the preferred way to create neurons is using the neuron, layer or even network classes.
 /// </summary>
 /// <param name="source">The source neuron feeding this synapse.</param>
 /// <param name="target">The target neuron fed by this synapse.</param>
 public Synapse(ConfigNode node, Neuron source, Neuron target)
 {
     node.AttatchToHost(this);
     _sourceNeuron = source;
     _targetNeuron = target;
     _weight       = _config.RandomInitialWeight();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Instanciate a new neuron. You'll hardly need to call this as the preferred way to create neurons is using the layer or even network classes.
 /// </summary>
 /// <param name="layer">The layer to refer this neuron to.</param>
 /// <param name="config">The configuration instance.</param>
 public Neuron(ConfigNode node, Layer layer)
 {
     node.AttatchToHost(this);
     _cDelta            = 0;
     _cTrain            = 0;
     _cActivity         = 0;
     _cOutput           = 0;
     _cBiasNeuronWeight = _config.RandomInitialWeight();
     _layer             = layer;
     _sourceSynapses    = new List <Synapse>();
     _targetSynapses    = new List <Synapse>();
 }