示例#1
0
 public BrainLayer(BrainLayer data)
 {
     neuronAmount        = data.neuronAmount;
     repition            = data.repition;
     biasArray           = null;
     activeNeuronFormula = data.activeNeuronFormula;
 }
示例#2
0
        public void BiasBreeding(BrainLayer data)
        {
            int i = neuronAmount;

            while (i-- > 0)
            {
                float value = (float)DataManagement.NextDouble();
                biasArray[i] = biasArray[i] * value + data.biasArray[i] * (1.0f - value);
            }
        }
示例#3
0
        public void CopyBiasArrayFromAnotherLayer(BrainLayer data)
        {
            float _biasArray = data.biasArray;
            int   i          = neuronAmount;

            while (i-- > 0)
            {
                biasArray[i] = _biasArray[i];
            }
        }
示例#4
0
 public Connection(BrainLayer input, BrainLayer output)
 {
     connectionAmount = input.neuronAmount * output.neuronAmount;
     wArray           = new float[connectionAmount];
 }