private void SetWeights(NetFileData data)
 {
     for (int i = 0; i < layers.Count - 1; i++)
     {
         layers[i + 1].SetWeights(layers[i].Neurons, data);
     }
 }
        public Layer(int id, NetFileData data)
        {
            Id = id;

            for (int i = 0; i < data.GetLayerSize(id); i++ )
            {
                neurons.Add(new Neuron(i));
            }

            neurons.Add(new BiasNode());
        }
        public void Setup(NetFileData data)
        {
            Neuron.Temperature = data.Temperature;
            Neuron.Threshold = data.Threshold;

            for (int i = 0; i < data.LayerCount; i++)
            {
                layers.Add(new Layer(i, data));
            }

            SetWeights(data);
        }
 public void SetWeights(List<Neuron> previousLayer, NetFileData data)
 {
     for(int i=0; i < neurons.Count; i++)
     {
         if (!(neurons[i] is BiasNode))
         {
             for (int prev = 0; prev < previousLayer.Count; prev++)
             {
                 double weight = data.GetWeights(Id, i, prev);
                 neurons[i].AddLink(weight, previousLayer[prev]);
             }
         }
     }
 }