コード例 #1
0
        private void initializeNeuronData(bool isInputLayerNeuron)
        {
            neuronData = new NeuronData();
            IdHelper.GetNextId(ref neuronData.Id);

            if (isInputLayerNeuron)
            {
                return;
            }

            neuronData.BiasWeight = RandomHelper.GetRandomMinusOneToOne();
            neuronData.BiasDiff   = 0d;
        }
コード例 #2
0
        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;
        }