public BrainLayer(BrainLayer data) { neuronAmount = data.neuronAmount; repition = data.repition; biasArray = null; activeNeuronFormula = data.activeNeuronFormula; }
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); } }
public void CopyBiasArrayFromAnotherLayer(BrainLayer data) { float _biasArray = data.biasArray; int i = neuronAmount; while (i-- > 0) { biasArray[i] = _biasArray[i]; } }
public Connection(BrainLayer input, BrainLayer output) { connectionAmount = input.neuronAmount * output.neuronAmount; wArray = new float[connectionAmount]; }