コード例 #1
0
 public void init(CY_NeuronToNeuronBackprop connector)
 {
     foreach (CY_Synapse_Backprop synapse in connector.Synapses)
     {
         synapse.W = GetRandom(min, max);
     }
 }
コード例 #2
0
        public void init(CY_NeuronToNeuronBackprop connector)
        {
            double nGuyenWidrowFactor = calcNguyenWidrow(connector.fromLayer.neurons.Length, connector.toLayer.neurons.Length);

            int synapsesPerNeuron = connector.synapses.Length / connector.toLayer.neurons.Length;

            foreach (CY_Neuron neuron in connector.toLayer.Neurons)
            {
                int      i = 0;
                double[] normalizedVector = GetRandomVector(synapsesPerNeuron, nGuyenWidrowFactor);
                foreach (CY_Synapse_Backprop synapse in connector.GetSourceSynapses(neuron))
                {
                    synapse.W = normalizedVector[i++];
                }
            }
        }