private void RandomizeNetwork() { Neuron.RandRange = new Range <double>(0, 255); // randomize net nt.Randomize(); }
// Radnomize weights of network private void RandomizeNetwork( ) { Neuron.RandRange = new Range(0, 255); // randomize net network.Randomize( ); // update map UpdateMap( ); }
// Randomize weights of network private void RandomizeNetwork() { if (network != null) { foreach (var neuron in (network?.Layers.SelectMany(layer => layer?.Neurons)).Where(neuron => neuron != null)) { neuron.RandGenerator = new UniformContinuousDistribution(new Range(0, 255)); } network?.Randomize(); } UpdateMap(); }
// Randomize weights of network private void RandomizeNetwork() { // set random generators range foreach (var layer in network.Layers) { foreach (var neuron in layer.Neurons) { neuron.RandGenerator = new UniformContinuousDistribution(new Range(0, 255)); } } // randomize net network.Randomize(); // update map UpdateMap(); }