Accord.Neuro.GaussianWeights.Randomize C# (CSharp) Method

Randomize() public method

Randomizes (initializes) the weights of the network using a Gaussian distribution.
public Randomize ( ) : void
return void
        public void Randomize()
        {
            foreach (ActivationLayer layer in network.Layers)
            {
                foreach (ActivationNeuron neuron in layer.Neurons)
                {
                    for (int i = 0; i < neuron.Weights.Length; i++)
                        neuron.Weights[i] = random.Generate();
                    if (UpdateThresholds)
                        neuron.Threshold = random.Generate();
                }
            }
        }

Same methods

GaussianWeights::Randomize ( int layerIndex ) : void