private void initializeNeuronData(bool isInputLayerNeuron) { neuronData = new NeuronData(); IdHelper.GetNextId(ref neuronData.Id); if (isInputLayerNeuron) { return; } neuronData.BiasWeight = RandomHelper.GetRandomMinusOneToOne(); neuronData.BiasDiff = 0d; }
private void initializeNeuronData(bool isInputLayerNeuron, IReadOnlyCollection <Neuron> attachedNeurons) { neuronData = new NeuronData(); IdHelper.GetNextId(ref neuronData.Id); if (isInputLayerNeuron) { return; } initializeDictionaries(attachedNeurons); neuronData.BiasWeight = RandomHelper.GetRandomMinusOneToOne(); neuronData.BiasDiff = 0d; }