Beispiel #1
0
 public Layer(NeyralNetworkConfig config, int neyronsCount, int connectionsCount = 1)
 {
     Neyrons = new Neyron[neyronsCount];
     for (int i = 0; i < neyronsCount; i++)
     {
         Neyrons[i] = new Neyron(connectionsCount, config);
     }
 }
Beispiel #2
0
 public Neyron(int weightsCount, NeyralNetworkConfig config)
 {
     Value         = 0;
     Delta         = 0;
     InputSinapses = new Sinaps[weightsCount];
     for (int i = 0; i < weightsCount; i++)
     {
         InputSinapses[i] = new Sinaps(config, this);
     }
 }
 public NeyralNetwork(NeyralNetworkConfig config, int[] neyronsOnOneLayer)
 {
     Config            = config;
     Layers            = new Layer[neyronsOnOneLayer.Length - 1];
     InputNeyronsCount = neyronsOnOneLayer[0];
     for (int i = 0; i < Capacity; i++)
     {
         Layers[i] = new Layer(config, neyronsOnOneLayer[i + 1], neyronsOnOneLayer[i]);
     }
 }
Beispiel #4
0
 public Sinaps(NeyralNetworkConfig config, Neyron outputNeuron)
 {
     Output = outputNeuron;
     Weight = RandomWeight();
     Config = config;
 }