Exemplo n.º 1
0
 public void CreateInputLayerTest()
 {
     NeuronNetwork net = new NeuronNetwork();
     NeuronLayer layerTest = new NeuronLayer();
     List<double> signal = new List<double>();
     signal.AddRange(new double[] { 2, 5 });
     net.SetSignal(signal);
     net.CreateInputLayer(2);
 }
Exemplo n.º 2
0
        private NeuronLayer CreateHiddenLayer(int countNeurons)
        {
            NeuronLayer layer = new NeuronLayer();
            List<Neuron> hiddenNeurons = new List<Neuron>();

            for (int i = 0; i < countNeurons; i++ )
            {
                hiddenNeurons.Add(new Neuron());
            }

            layer.AddNeurons(hiddenNeurons);

            return layer;
        }
Exemplo n.º 3
0
 // методы для соединения слоев
 public void ConnectNextLayer(NeuronLayer layer)
 {
     for (int i = 0; i < neurons.Count;i++ )
     {
         for (int j = 0; j < layer.neurons.Count; j++)
         {
             neurons[i].ConnectNeuron(layer.neurons[j], 1, 5);
         }
     }
 }